Problem2096--ABC175A - Rainy Season

2096: ABC175A - Rainy Season

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

我们在AtCoder镇有连续三天的天气记录。长度为3的字符串S表示三天的天气记录-如果第i个字符为“S”,则表示当天阳光明媚
-第i天;如果该字符为“R”,则表示那天下雨。

找出此期间连续雨天的最大数量。例如:RRS,则连续下雨天数的最大数量是2.



Time Limit: 2 sec / Memory Limit: 1024 MB

Problem Statement
We have weather records at AtCoder Town for some consecutive three days. A string of length 33, SS, represents the records - if the i-th character is 'S', it means it was sunny on the ii-th day; if that character is 'R', it means it was rainy on that day.
Find the maximum number of consecutive rainy days in this period.

Constraints

  • |S|=3
  • Each character of S is 'S' or 'R'.

Input

Input is given from Standard Input in the following format:

S 

Output

Print the maximum number of consecutive rainy days in the period.

Sample Input Copy

RRS

Sample Output Copy

2

HINT

We had rain on the 1-st and 2-nd days in the period. Here, the maximum number of consecutive rainy days is 2, so we should print 2.

Source/Category