weatherS = input()
serial = 0
dayBefore = ''
for x in weatherS:
    if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
    dayBefore = x
print(serial) weatherS = input() weatherS input() input serial = 0 serial 0 dayBefore = '' dayBefore '' for x in weatherS:
    if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
    dayBefore = x x weatherS if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
     dayBefore != 'R' dayBefore 'R' if x == 'R':
            serial = 1
     x == 'R' x 'R' serial = 1 serial 1 if x == 'R':
            serial += 1
     x == 'R' x 'R' serial += 1 serial 1 dayBefore = x dayBefore x print(serial) print serial dayBefore = x x dayBefore weatherS = input() input() weatherS dayBefore = '' '' dayBefore serial = 1 1 serial serial = 0 0 serial serial += 1 1 serial
weatherS = input()
serial = 0
dayBefore = ''
for x in weatherS:
    if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
    dayBefore = x
print(serial)