fun main() {
	val n = readLine()!!.toInt()
	val s = readLine()!!
	var (c,l,r) = listOf(-1,-1,n)
	do {
		++c
		l = s.indexOf('W',l+1)
		r = s.lastIndexOf('R',r-1)
	} while(l!=-1&&r!=-1&&l<r)
	println(c)
}
