let () =
  let s = Scanf.scanf "%s " (fun a -> a) in

  let s_len = String.length s in
  let p_len = Batteries.String.to_list s |> List.filter (fun x -> x = 'p') |> List.length in

  Printf.printf "%d\n" @@ (s_len/2) - p_len
