Simple Solution with DP
Approach
Create an array in which we will store the number of combinations for the ith element
We find the first element case value is 1, because we don't care
# Approach
1. Create an array in which we will store the number of combinations for the ith element 
2. We find the first element case value is 1, because we don't care about the leading zeros (from the condition) 
3. The number of combinations of the current element is equal to the number of combinations of the previous element multiplied by <b>2</b>. In code <b><i> 2 * combination[i - 1].</i></b>
<b>Important</b>: This number of combinations includes duplicates. 
4. Delete the duplicate for the current number of combinations: the number of duplicates is equal to the number of combinations of the element before the element which have the same value. 
<b>For example</b> 
if the current element is 1, then the number of duplicates is equal to the number of combinations the element had before the previous 1.

# Complexity
- Time complexity:
O(N)

- Space complexity:
O(N)

# Code
```csharp []
public class Solution {
    public int NumberOfUniqueGoodSubsequences(string binary)
    {
        const long MOD = 1000000007L;
        int n = binary.Length;
        long[] combinations = new long[n];
        int i = 0, j = 0;
        while (i < n && binary[i] == '0')
            ++i;

        if (i == n)
            return 1;

        int last1 = i,
            last0 = i > 0 ? i -1 : 0;
        combinations[i++] = 1;
        for (;i < n; ++i)
        {
            if (binary[i] == '0')
            {
                j = last0;
                last0 = i;
            }
            else
            {
                j = last1;
                last1 = i;
            }
            
            long dup = j > 0 ? combinations[j - 1] : 0;
            combinations[i] = (2 * combinations[i - 1] % MOD - dup + MOD) % MOD;
        }
        
        return (int)((combinations[n - 1] + (binary.IndexOf('0') != -1 ? 1L : 0L)) % MOD);
    }
}
```
['C#']