def main(S):
    rains = S.split('S')
    return max([len(r) for r in rains])

if __name__ == '__main__':
    S = input()
    ans = main(S)
    print(ans)
     def main(S):
    rains = S.split('S')
    return max([len(r) for r in rains]) main rains = S.split('S') rains S.split('S') S.split S split 'S' len(r) for r in rains for r in rains r rains for r in rains len(r) len r return max([len(r) for r in rains]) max([len(r) for r in rains]) max [len(r) for r in rains] S S if __name__ == '__main__':
    S = input()
    ans = main(S)
    print(ans)
     __name__ == '__main__' __name__ '__main__' S = input() S input() input ans = main(S) ans main(S) main S print(ans) print ans def main(S):
    rains = S.split('S')
    return max([len(r) for r in rains]) def main(S):
    rains = S.split('S')
    return max([len(r) for r in rains]) main ans = main(S) main(S) ans S = input() input() S
def main(S):
    rains = S.split('S')
    return max([len(r) for r in rains])

if __name__ == '__main__':
    S = input()
    ans = main(S)
    print(ans)
    
