package main import . "fmt" import . "strings" func main() { var s string Scan(&s) if b, _, ok := Cut(s, "pain"); ok { Println(Count(b, "pon")) } else { Println(-1) } }