python 3
\nclass Solution:\n    def numberOfUniqueGoodSubsequences(self, binary: str) -> int:\n        j=0\n        sub=False\n        count=0\n        while j<len(binar
```\nclass Solution:\n    def numberOfUniqueGoodSubsequences(self, binary: str) -> int:\n        j=0\n        sub=False\n        count=0\n        while j<len(binary):\n            if binary[j]==\'1\':\n                count=1\n                prev1=0\n                prev2=0\n                break\n            if binary[j]==\'0\':\n                sub=True\n            j+=1\n        for i in range(j+1,len(binary)):\n            if binary[i]==\'0\':\n                mid=count\n                count+=(count-prev1)\n                prev1=mid\n                sub=True\n            else:\n                mid=count\n                count+=(count-prev2)\n                prev2=mid\n        if sub==True:\n            count+=1\n        return count%(10**9+7)\n```
[]