w = list(input())
out = 0
cnt = 0
for i in range(len(w)):
    if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt)
print(out) w = list(input()) w list(input()) list input() input out = 0 out 0 cnt = 0 cnt 0 for i in range(len(w)):
    if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt) i range(len(w)) range len(w) len w if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt) w[i] == "S" w[i] w i "S" cnt = 0 cnt 0 elif w[i] == "R":
        cnt += 1
        out = max(out, cnt) w[i] == "R" w[i] w i "R" cnt += 1 cnt 1 out = max(out, cnt) out max(out, cnt) max out cnt print(out) print out out = max(out, cnt) max(out, cnt) out cnt += 1 1 cnt cnt = 0 0 cnt w = list(input()) list(input()) w out = 0 0 out cnt = 0 0 cnt
w = list(input())
out = 0
cnt = 0
for i in range(len(w)):
    if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt)
print(out)