days = input()

day1 = days[0]
day2 = days[1]
day3 = days[2]

ans = 0

if day1 == "R":
    ans += 1
    if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1
elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

elif day3 == "R":
    ans +=1

print(ans) days = input() days input() input day1 = days[0] day1 days[0] days 0 day2 = days[1] day2 days[1] days 1 day3 = days[2] day3 days[2] days 2 ans = 0 ans 0 if day1 == "R":
    ans += 1
    if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1
elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

elif day3 == "R":
    ans +=1 day1 == "R" day1 "R" ans += 1 ans 1 if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1 day2 == "R" day2 "R" ans += 1 ans 1 if day3 == "R":
            ans +=1 day3 == "R" day3 "R" ans +=1 ans 1 elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1 day2 == "R" day2 "R" ans += 1 ans 1 if day3 == "R":
         ans +=1 day3 == "R" day3 "R" ans +=1 ans 1 elif day3 == "R":
    ans +=1 day3 == "R" day3 "R" ans +=1 ans 1 print(ans) print ans day1 = days[0] days[0] day1 day2 = days[1] days[1] day2 ans +=1 1 ans ans += 1 1 ans days = input() input() days ans = 0 0 ans ans += 1 1 ans ans += 1 1 ans ans +=1 1 ans day3 = days[2] days[2] day3 ans +=1 1 ans
days = input()

day1 = days[0]
day2 = days[1]
day3 = days[2]

ans = 0

if day1 == "R":
    ans += 1
    if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1
elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

elif day3 == "R":
    ans +=1

print(ans)