puts $<.read.split("").select{|s|s=='W'}.count