def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0)


if __name__ == '__main__':
    main() def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0) main S = input() S input() input count = 1 count 1 if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0) 'R' in S 'R' S for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
         i range(len(S)-1) range len(S)-1 len(S) len S 1 if S[i] == S[i+1] == 'R':
                count += 1
         S[i] == S[i+1] == 'R' S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 'R' count += 1 count 1 print(count) print count print(0) print 0 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0) def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0) main
def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1] == 'R':
                count += 1
        print(count)

    else:
        print(0)


if __name__ == '__main__':
    main()