print((function (f, s, t) local r=0 for _ in s:gmatch(t) do r=r+1 end return f:format((#s-1)/5-r,r) end)("%.0f %.0f", io.stdin:read("*l"), "%*^"))