s=list(input())
count=0

if 'R' in s:
  count+=1
for i in range(len(s)-1):
  if s[i]==s[i+1] and s[i]=='R':
    count+=1
print(count) s=list(input()) s list(input()) list input() input count=0 count 0 if 'R' in s:
  count+=1 'R' in s 'R' s count+=1 count 1 for i in range(len(s)-1):
  if s[i]==s[i+1] and s[i]=='R':
    count+=1 i range(len(s)-1) range len(s)-1 len(s) len s 1 if s[i]==s[i+1] and s[i]=='R':
    count+=1 s[i]==s[i+1] and s[i]=='R' s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 s[i]=='R' s[i] s i 'R' count+=1 count 1 print(count) print count s=list(input()) list(input()) s count+=1 1 count count=0 0 count count+=1 1 count
s=list(input())
count=0

if 'R' in s:
  count+=1
for i in range(len(s)-1):
  if s[i]==s[i+1] and s[i]=='R':
    count+=1
print(count)
