object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datN) = readLine.split(" ").map(_.toInt)
    val datC = readLine
    // Make RRRRR...WWWW
    val numR = datC.filter(_ == 'R').length
    val numWinRArea = datC.substring(0, numR).filter(_ == 'W').length

    //println(datC.filter(_ == 'R'))
    //println(datC.substring(0, numR))
    println(numWinRArea)
  }
}
