open Printf
open Scanf

let solve a b c =
  match List.sort compare [a; b; c] with
    [x; y; z] -> if x = z then 1
                 else if x = y then 2
                 else if y = z then 2
                 else 3
  | _ -> 0

let () =
  scanf "%d %d %d " solve |> printf "%d\n"
