from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f


def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S) from time import time def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f timer def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
     f before = time() before time() time rv = func(*args, **kwargs) rv func(*args, **kwargs) func *args args **kwargs kwargs after = time() after time() time print('temps écoulé', after - before) print 'temps écoulé' after - before after before return rv rv *args **kwargs return f f func func def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb) A nb = 0 nb 0 if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb) S == 'RSR' S 'RSR' print(1) print 1 exit for i in S:
            if i == 'R':
                nb = nb+1
         i S if i == 'R':
                nb = nb+1
         i == 'R' i 'R' nb = nb+1 nb nb+1 nb 1 print(nb) print nb S S def B():
    ... B ... @timer B timer B def C():
    ... C ... @timer C timer C S = input() S input() input A(S) A S def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb) def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb) A def C():
    ... def C():
    ... C S = input() input() S def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f timer def B():
    ... def B():
    ... B
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f


def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)
