package main import . "fmt" func main() { var n int for { var c rune _,e:=Scanf("%c",&c) if e!=nil { break } if c=='W' { n++ } } Println(n) }