open Batteries

let () =
  let n = Scanf.scanf "%s " (fun a -> a) in
  let digits = String.to_list n |> List.map (fun x -> int_of_char x - 48)  in
  let sum = List.fold_left (+) 0 digits in

  Printf.printf "%d\n" (if sum = 1 then 10 else sum)

