def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0)
resolve() def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0) resolve len(x) for x in input().split("S") if x for x in input().split("S") if x x input().split("S") ().split () input split "S" x if x len(x) len x data = [len(x) for x in input().split("S") if x] data [len(x) for x in input().split("S") if x] print(max(data) if data else 0) print max(data) if data else 0 data max(data) max data 0 resolve() resolve def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0) def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0) resolve
def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0)
resolve()