S = input()
cnt = 0
for i,ch in enumerate(S):
  if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1
print(cnt) S = input() S input() input cnt = 0 cnt 0 for i,ch in enumerate(S):
  if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1 i ch enumerate(S) enumerate S if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1 cnt == 0 cnt 0 if ch == "R":
      cnt = 1
   ch == "R" ch "R" cnt = 1 cnt 1 elif ch == "R" and S[i-1] == "R":
    cnt += 1 ch == "R" and S[i-1] == "R" ch == "R" ch "R" S[i-1] == "R" S[i-1] S i-1 i 1 "R" cnt += 1 cnt 1 print(cnt) print cnt S = input() input() S cnt += 1 1 cnt cnt = 1 1 cnt cnt = 0 0 cnt
S = input()
cnt = 0
for i,ch in enumerate(S):
  if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1
print(cnt)