a =input ()
k = 0
for i in range(3):
  if a[i]== "R":
    k=k+1
if a=="RSR":
  k=1
print (k) a =input () a input () input k = 0 k 0 for i in range(3):
  if a[i]== "R":
    k=k+1 i range(3) range 3 if a[i]== "R":
    k=k+1 a[i]== "R" a[i] a i "R" k=k+1 k k+1 k 1 if a=="RSR":
  k=1 a=="RSR" a "RSR" k=1 k 1 print (k) print k a =input () input () a k = 0 0 k k=k+1 k+1 k k=1 1 k
a =input ()
k = 0
for i in range(3):
  if a[i]== "R":
    k=k+1
if a=="RSR":
  k=1
print (k)