N = int(input())
stones = input()

total_count_R = stones.count('R')
left_count_R = stones[0:total_count_R].count('R')

answer = total_count_R - left_count_R

print(answer) N = int(input()) N int(input()) int input() input stones = input() stones input() input total_count_R = stones.count('R') total_count_R stones.count('R') stones.count stones count 'R' left_count_R = stones[0:total_count_R].count('R') left_count_R stones[0:total_count_R].count('R') [0:total_count_R].count [0:total_count_R] stones 0:total_count_R 0 total_count_R count 'R' answer = total_count_R - left_count_R answer total_count_R - left_count_R total_count_R left_count_R print(answer) print answer left_count_R = stones[0:total_count_R].count('R') stones[0:total_count_R].count('R') left_count_R answer = total_count_R - left_count_R total_count_R - left_count_R answer N = int(input()) int(input()) N stones = input() input() stones total_count_R = stones.count('R') stones.count('R') total_count_R
N = int(input())
stones = input()

total_count_R = stones.count('R')
left_count_R = stones[0:total_count_R].count('R')

answer = total_count_R - left_count_R

print(answer)