#include<stdio.h>
int main(){
int input, a, b, c, max;
scanf("%d", &input);
a = input / 100; //첫째 자리 a 입니다.
b = input % 100 / 10; //둘째 자리 b 입니다.
c = input % 10; //셋째자리 c 입니다.
(a > b) && (a > c) ? max = a : printf(""); //a가 가장 크다면 max = a;
(b > a) && (b > c) ? max = b : printf(""); //b가 가장 크다면 max = b;
(c > a) && (c > b) ? max = c : printf(""); //c가 가장 크다면 max = c;
printf("%d", max);
return 0;
}