f = gets.chomp r, l = 0, 0 5.step(f.length, 5) do |n| f[n - 2] == "*" ? r += 1 : l += 1 end print r, " ", l, "\n"