def check_weather(weathers: str) -> int:
    count = weathers.count('R')
    return 1 if weathers[1] == 'S' and count == 2 else count

if __name__=='__main__':
    print(check_weather(input())) def check_weather(weathers: str) -> int:
    count = weathers.count('R')
    return 1 if weathers[1] == 'S' and count == 2 else count check_weather count = weathers.count('R') count weathers.count('R') weathers.count weathers count 'R' return 1 if weathers[1] == 'S' and count == 2 else count 1 if weathers[1] == 'S' and count == 2 else count weathers[1] == 'S' and count == 2 weathers[1] == 'S' weathers[1] weathers 1 'S' count == 2 count 2 1 count weathers: str weathers if __name__=='__main__':
    print(check_weather(input())) __name__=='__main__' __name__ '__main__' print(check_weather(input())) print check_weather(input()) check_weather input() input def check_weather(weathers: str) -> int:
    count = weathers.count('R')
    return 1 if weathers[1] == 'S' and count == 2 else count def check_weather(weathers: str) -> int:
    count = weathers.count('R')
    return 1 if weathers[1] == 'S' and count == 2 else count check_weather
def check_weather(weathers: str) -> int:
    count = weathers.count('R')
    return 1 if weathers[1] == 'S' and count == 2 else count

if __name__=='__main__':
    print(check_weather(input()))