n = int(input())
cl = str(input())
cl_R = cl.count("R")
# print(cl_R)
cl_leftR = cl[:cl_R].count("R")
# print(cl_leftR)
print(cl_R-cl_leftR) n = int(input()) n int(input()) int input() input cl = str(input()) cl str(input()) str input() input cl_R = cl.count("R") cl_R cl.count("R") cl.count cl count "R" cl_leftR = cl[:cl_R].count("R") cl_leftR cl[:cl_R].count("R") [:cl_R].count [:cl_R] cl :cl_R cl_R count "R" print(cl_R-cl_leftR) print cl_R-cl_leftR cl_R cl_leftR cl = str(input()) str(input()) cl n = int(input()) int(input()) n cl_R = cl.count("R") cl.count("R") cl_R cl_leftR = cl[:cl_R].count("R") cl[:cl_R].count("R") cl_leftR
n = int(input())
cl = str(input())
cl_R = cl.count("R")
# print(cl_R)
cl_leftR = cl[:cl_R].count("R")
# print(cl_leftR)
print(cl_R-cl_leftR)