import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx)
if __name__ == '__main__':
    main() import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx) main S = input() S input() input cnt = 0 cnt 0 mx = 0 mx 0 for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
     i range(len(S)) range len(S) len S if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
         S[i] == 'R' S[i] S i 'R' cnt += 1 cnt 1 cnt = 0 cnt 0 mx = max(mx, cnt) mx max(mx, cnt) max mx cnt print(mx) print mx if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main read = sys.stdin.buffer.read sys.stdin.buffer.read read readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx) def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx) main
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx)
if __name__ == '__main__':
    main()
