'use strict'

function Main(input) {
  const list = input.split("").map(x => Number(x));
  let total = 0;

  for(let i=0; i<list.length; i++) {
    total += list[i];
  }

  if(total === 1) {
    console.log(10);
  } else {
    console.log(total);
  }

}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());