Easy Java Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int numberOfUniqueGoodSubsequences(String binary) {\n        \n        int endsWithOne = 0;\n        int endsWithTwo = 0;\n        int MOD = 1_000_000_007;\n        int hasZero = 0;\n        for(int i=0; i<binary.length();i++){\n            if(binary.charAt(i)==\'1\'){\n                endsWithOne = (endsWithOne + endsWithTwo + 1)%MOD;\n            }else{\n                hasZero = 1;\n                endsWithTwo = (endsWithOne + endsWithTwo)%MOD;\n            }\n        }\n        int ans = (endsWithOne + endsWithTwo + hasZero)%MOD;\n        \n        return ans;\n    }\n}\n```
['Java']