def solve(string):
    return str(max(map(len, string.split("S"))))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip())) def solve(string):
    return str(max(map(len, string.split("S")))) solve return str(max(map(len, string.split("S")))) str(max(map(len, string.split("S")))) str max(map(len, string.split("S"))) max map(len, string.split("S")) map len string.split("S") string.split string split "S" string string if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip())) __name__ == '__main__' __name__ '__main__' import sys sys print(solve(sys.stdin.read().strip())) print solve(sys.stdin.read().strip()) solve sys.stdin.read().strip() sys.stdin.read().strip sys.stdin.read() sys.stdin.read sys.stdin sys stdin read strip def solve(string):
    return str(max(map(len, string.split("S")))) def solve(string):
    return str(max(map(len, string.split("S")))) solve
def solve(string):
    return str(max(map(len, string.split("S"))))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))
