weather = input()

seq = 0
prev = False
for i in range(3):
    if weather[i] == 'R':
        if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
    else:
        prev = False
            
print(seq) weather = input() weather input() input seq = 0 seq 0 prev = False prev False for i in range(3):
    if weather[i] == 'R':
        if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
    else:
        prev = False
             i range(3) range 3 if weather[i] == 'R':
        if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
    else:
        prev = False
             weather[i] == 'R' weather[i] weather i 'R' if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
     prev seq += 1 seq 1 prev = True prev True seq = 1 seq 1 prev = True prev True prev = False prev False print(seq) print seq prev = True True prev prev = True True prev seq = 1 1 seq prev = False False prev seq = 0 0 seq weather = input() input() weather seq += 1 1 seq prev = False False prev
weather = input()

seq = 0
prev = False
for i in range(3):
    if weather[i] == 'R':
        if prev:
            seq += 1
            prev = True
        else:
            seq = 1
            prev = True
    else:
        prev = False
            
print(seq)