s=input()

def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0
print(solution(s)) s=input() s input() input def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0 solution if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0 'RRR' in s 'RRR' s return 3 3 elif 'RR' in s:
    return 2
   'RR' in s 'RR' s return 2 2 elif 'R' in s:
    return 1
   'R' in s 'R' s return 1 1 return 0 0 s s print(solution(s)) print solution(s) solution s def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0 def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0 solution s=input() input() s
s=input()

def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0
print(solution(s))