Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of 1 to n in order, modulo 109 + 7.
 
Please complete the following python code precisely:
```python
class Solution:
    def concatenatedBinary(self, n: int) -> int:
```