Given a string s, count the distinct non-empty subsequences of s. Two subsequences are the same if they produce identical strings, regardless of which positions were used. Return the count modulo 1000000007. The input is JSON {s}.
Input: JSON {s}.
Output: Integer — the number of distinct non-empty subsequences modulo 1e9+7.
Input: {"s":"abc"}
Output: 7
Explanation: a, b, c, ab, ac, bc, abc.Input: {"s":"aba"}
Output: 6
Explanation: a, b, ab, ba, aa, aba.Input: {"s":"aaa"}
Output: 3
Explanation: a, aa, aaa.1<=|s|<=2000