def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R'])

weather = input()
print(count_rainy(weather)) def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R']) count_rainy if weather == 'RSR':
        return 1
     weather == 'RSR' weather 'RSR' return 1 1 r for r in weather if r == 'R' for r in weather if r == 'R' r weather r == 'R' r 'R' if r == 'R' r return len([r for r in weather if r == 'R']) len([r for r in weather if r == 'R']) len [r for r in weather if r == 'R'] weather weather weather = input() weather input() input print(count_rainy(weather)) print count_rainy(weather) count_rainy weather weather = input() input() weather def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R']) def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R']) count_rainy
def count_rainy(weather): 
    if weather == 'RSR':
        return 1
    return len([r for r in weather if r == 'R'])

weather = input()
print(count_rainy(weather))