
let f i = match i with
  (a, b, c) -> a + b + c

let char_to_int c1 c2 c3 = (int_of_string (String.make 1 c1),
                            int_of_string (String.make 1 c2),
                            int_of_string (String.make 1 c3))
let input = Scanf.bscanf Scanf.Scanning.stdin "%c%c%c" char_to_int

let () = print_int (f input)
