#!/usr/bin/env python
# -*- coding: utf-8 -*-

input()
stones = input()
red_count = 0
for stone in stones:
	if stone == 'R':
		red_count += 1

white_count = 0
for stone in stones[:red_count]:
	if stone == 'W':
		white_count += 1

print(white_count) input() input stones = input() stones input() input red_count = 0 red_count 0 for stone in stones:
	if stone == 'R':
		red_count += 1 stone stones if stone == 'R':
		red_count += 1 stone == 'R' stone 'R' red_count += 1 red_count 1 white_count = 0 white_count 0 for stone in stones[:red_count]:
	if stone == 'W':
		white_count += 1 stone stones[:red_count] stones :red_count red_count if stone == 'W':
		white_count += 1 stone == 'W' stone 'W' white_count += 1 white_count 1 print(white_count) print white_count stones = input() input() stones white_count += 1 1 white_count red_count = 0 0 red_count red_count += 1 1 red_count white_count = 0 0 white_count
#!/usr/bin/env python
# -*- coding: utf-8 -*-

input()
stones = input()
red_count = 0
for stone in stones:
	if stone == 'R':
		red_count += 1

white_count = 0
for stone in stones[:red_count]:
	if stone == 'W':
		white_count += 1

print(white_count)
