Count Distinct Subsequences

easy
1. You are given a string.
2. You have to print the count of distinct and non-empty subsequences of the given string. 

Note -> String contains only lowercase letters.

Input Format

A String

Output Format

A number

Constraints

1 <= length of string <= 60

Example

Input
abc
Output
7
Previous
Print All Results In 0-1 Knapsack
Next
Count Of Distinct Palindromic Subsequences

Related Questions