#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')


def solve(S: str):
    return sum([S == "RRR", "RR" in S, "R" in S])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}')


if __name__ == '__main__':
    main() from typing import * import collections collections import functools as fts functools import itertools as its itertools import math math import sys sys INF = float('inf') INF float('inf') float 'inf' def solve(S: str):
    return sum([S == "RRR", "RR" in S, "R" in S]) solve return sum([S == "RRR", "RR" in S, "R" in S]) sum([S == "RRR", "RR" in S, "R" in S]) sum [S == "RRR", "RR" in S, "R" in S] S == "RRR" S "RRR" "RR" in S "RR" S "R" in S "R" S S: str S def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}') main sys.setrecursionlimit(10 ** 6) sys.setrecursionlimit sys setrecursionlimit 10 ** 6 10 6 def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
     iterate_tokens for line in sys.stdin:
            for word in line.split():
                yield word
     line sys.stdin sys stdin for word in line.split():
                yield word
     word line.split() line.split line split yield word word tokens = iterate_tokens() tokens iterate_tokens() iterate_tokens S = next(tokens) S next(tokens) next tokens print(f'{solve(S)}') print f'{solve(S)}' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main INF = float('inf') float('inf') INF def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}') def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}') main def solve(S: str):
    return sum([S == "RRR", "RR" in S, "R" in S]) def solve(S: str):
    return sum([S == "RRR", "RR" in S, "R" in S]) solve
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')


def solve(S: str):
    return sum([S == "RRR", "RR" in S, "R" in S])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}')


if __name__ == '__main__':
    main()
