Var M, N, sumN: integer; begin readln(N); M := N; sumN := 0; while (M > 0) do begin inc(sumN, M mod 10); M := M div 10; end; M := (N div sumN + 1) * sumN; if (M < 2*N) then writeln(M) else writeln('нет') end.