n = int(input())
c = list(input())
 
nR = c.count("R")
 
if nR == 0 or nR == len(c):
    print(0)
else:
    print(c[:nR].count("W")) n = int(input()) n int(input()) int input() input c = list(input()) c list(input()) list input() input nR = c.count("R") nR c.count("R") c.count c count "R" if nR == 0 or nR == len(c):
    print(0)
else:
    print(c[:nR].count("W")) nR == 0 or nR == len(c) nR == 0 nR 0 nR == len(c) nR len(c) len c print(0) print 0 print(c[:nR].count("W")) print c[:nR].count("W") [:nR].count [:nR] c :nR nR count "W" c = list(input()) list(input()) c n = int(input()) int(input()) n nR = c.count("R") c.count("R") nR
n = int(input())
c = list(input())
 
nR = c.count("R")
 
if nR == 0 or nR == len(c):
    print(0)
else:
    print(c[:nR].count("W"))