# # abc175_a.py
S = input()
ans  = [0]
cnt = 0
for i in S:
    if i =="S":
        ans.append(cnt)
        cnt = 0
    else:
        cnt+=1
print(max(max(ans),cnt)) S = input() S input() input ans  = [0] ans [0] 0 cnt = 0 cnt 0 for i in S:
    if i =="S":
        ans.append(cnt)
        cnt = 0
    else:
        cnt+=1 i S if i =="S":
        ans.append(cnt)
        cnt = 0
    else:
        cnt+=1 i =="S" i "S" ans.append(cnt) ans.append ans append cnt cnt = 0 cnt 0 cnt+=1 cnt 1 print(max(max(ans),cnt)) print max(max(ans),cnt) max max(ans) max ans cnt ans  = [0] [0] ans cnt = 0 0 cnt cnt+=1 1 cnt S = input() input() S cnt = 0 0 cnt
# # abc175_a.py
S = input()
ans  = [0]
cnt = 0
for i in S:
    if i =="S":
        ans.append(cnt)
        cnt = 0
    else:
        cnt+=1
print(max(max(ans),cnt))
