def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts))


if __name__ == '__main__':
    main() def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts)) main s = input() s input() input counts = [0] counts [0] 0 for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

     c s if c == 'S':
            counts.append(0)
         c == 'S' c 'S' counts.append(0) counts.append counts append 0 if c == 'R':
            counts[-1] += 1

     c == 'R' c 'R' counts[-1] += 1 counts[-1] counts -1 1 print(max(counts)) print max(counts) max counts if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts)) def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts)) main
def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts))


if __name__ == '__main__':
    main()
