Var n, sum, count: integer; begin read(n); sum := 0; count := 0; while n > 0 do begin sum := sum + n mod 10; n := n div 10; count := count + 1; end; writeln(sum); writeln(count); end.