import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    S = input()
    answer = 0
    ans_list = [0]
    for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
    ans_list.append(answer)
    print(max(ans_list))


if __name__ == "__main__":
    main() import sys sys def input():
    return sys.stdin.readline().strip() input return sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip sys.setrecursionlimit(20000000) sys.setrecursionlimit sys setrecursionlimit 20000000 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float("inf") INF float("inf") float "inf" def main():
    S = input()
    answer = 0
    ans_list = [0]
    for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
    ans_list.append(answer)
    print(max(ans_list)) main S = input() S input() input answer = 0 answer 0 ans_list = [0] ans_list [0] 0 for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
     i range(3) range 3 if S[i] == "R":
            answer += 1
         S[i] == "R" S[i] S i "R" answer += 1 answer 1 if S[i] == "S":
            ans_list.append(answer)
            answer = 0
     S[i] == "S" S[i] S i "S" ans_list.append(answer) ans_list.append ans_list append answer answer = 0 answer 0 ans_list.append(answer) ans_list.append ans_list append answer print(max(ans_list)) print max(ans_list) max ans_list if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    S = input()
    answer = 0
    ans_list = [0]
    for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
    ans_list.append(answer)
    print(max(ans_list)) def main():
    S = input()
    answer = 0
    ans_list = [0]
    for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
    ans_list.append(answer)
    print(max(ans_list)) main MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def input():
    return sys.stdin.readline().strip() def input():
    return sys.stdin.readline().strip() input INF = float("inf") float("inf") INF
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    S = input()
    answer = 0
    ans_list = [0]
    for i in range(3):
        if S[i] == "R":
            answer += 1
        if S[i] == "S":
            ans_list.append(answer)
            answer = 0
    ans_list.append(answer)
    print(max(ans_list))


if __name__ == "__main__":
    main()
