409822: GYM103797 I I cry

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. I crytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Cosenza hates studying. He hates it so much that he can't study on the same day he takes an exam. He developed a method of studying that optimizes his time: for each exam he studies for exactly one full day. As long as he takes a full day to study a single subject, he won't forget it until the exam arrives. But this method is not always possible, as Cosenza sometimes notices too late that the exams are coming. If he is not able to use his method, he's going to cry, and we don't want that! Help him find out if he still has time to study in his weird way.

For the last few months, Cosenza has also been addicted to CSGO. He is on a streak of $$$100$$$ consecutive days playing it daily! He only plays on free days, which are the days without exams and that he doesn't have to study. He doesn't want to lose his streak, so he also wants to know how many more days he can add to his streak if he uses his method of studying.

Remember to make a fast program, as Cosenza's exams can occur for a few centuries.

Input

The first and only line of input consists of a non-empty string $$$S$$$ ($$$0 < |S| \leq 10^6$$$) containing only F's and E's — Cosenza's exam schedule. An 'F' represents a free day. An 'E' represents an exam day. There's at least one exam day.

Output

Print a single integer, the number of days Cosenza can add to his streak. If it's not possible to use his method of studying, print "I cry".

ExamplesInput
EFFFFF
Output
I cry
Input
FFEE
Output
0
Input
FFEEE
Output
I cry
Input
FFFEFFFFFFFFFE
Output
2

加入题单

上一题 下一题 算法标签: