Concat Binary Numbers

Concatenate the binary representations of all integers from 1 to n in order, forming one large binary string. Convert this string back to decimal and return the result modulo 10^9 + 7.

Examples
Input: 1
Output: 1
Hints

Concat Binary Numbers

Concatenate the binary representations of all integers from 1 to `n` in order, forming one large binary string. Convert this string back to decimal and return the result modulo 10^9 + 7.