package main import ( "fmt" "strings" ) func main() { var n, m int fmt.Scan(&n, &m) var s string cnt := 0 for i := 0; i < n; i++ { fmt.Scan(&s) cnt += strings.Count(s, "R") } fmt.Println(n*m - cnt) }