Program bigDigit; var n, maxdig: integer; begin maxdig := 0; readln(n); if (n < 0) then n := -n; while n > 0 do begin if (n mod 10 > maxdig) then maxdig := n mod 10; n := n div 10; end; writeln(maxdig); end.