n = gets.chomp.to_i
c_arr = gets.chomp

w_count = 0
(0..n/2-1).each do |i|
  w_count += 1 if c_arr[i] == "W"
end

r_count = 0
((n/2.to_f).ceil..n-1).each do |i|
  r_count += 1 if c_arr[i] == "R"
end

puts [w_count, r_count].min
