weather = input()

if "R" not in weather:
    print(0)
elif weather.count("R") == 2 and weather[1:2] == "R":
    print(2)
elif weather.count("R") == 3:
    print(3)
else:
    print(1) weather = input() weather input() input if "R" not in weather:
    print(0)
elif weather.count("R") == 2 and weather[1:2] == "R":
    print(2)
elif weather.count("R") == 3:
    print(3)
else:
    print(1) "R" not in weather "R" weather print(0) print 0 elif weather.count("R") == 2 and weather[1:2] == "R":
    print(2) weather.count("R") == 2 and weather[1:2] == "R" weather.count("R") == 2 weather.count("R") weather.count weather count "R" 2 weather[1:2] == "R" weather[1:2] weather 1:2 1 2 "R" print(2) print 2 elif weather.count("R") == 3:
    print(3) weather.count("R") == 3 weather.count("R") weather.count weather count "R" 3 print(3) print 3 print(1) print 1 weather = input() input() weather
weather = input()

if "R" not in weather:
    print(0)
elif weather.count("R") == 2 and weather[1:2] == "R":
    print(2)
elif weather.count("R") == 3:
    print(3)
else:
    print(1)