puts$<.drop(1).map{|e| w=g=r=f=0 e.chomp.chars{|c| if c=='R' r+=1 break if g