AlgoUniversity
  • Go Back
Discussion
Alex Keyboard :

Author

Akash

Difficulty Level : Easy

Submissions : 371

Asked In : Hexaware

Marks :10

: 2 | : 0

Alex is having a problem with his keyboard. If he is pressing any key, he is getting one or more occurrences of that character. Example: If he wants to write hey, his keyboard may write hey, hhey, hheey, heey, hhheyyy, or some other combination of the characters pressed by him.

You are given a string $$$s$$$ typed by Alex. Your task is to find out the number of possible strings Alex was trying to type and print the same. Output can be very large. Print (number of ways % $$$10^9 + 7$$$) Where % is the modular operator.

Input

The first line contains the string $$$s$$$ $$$(1 \le |s| \le 10^5)$$$.

Output

Print the number of possible strings Alex was trying to type .

Examples

Input
abbb
Output
3
Input
aaaa
Output
4

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.