#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
int num, num1, num2, num3;
cin >> num;
num1 = num / 100;
num2 = num % 100 / 10;
num3 = num % 10;
if(num1 > num2 && num1 > num3){
cout << num1;
}else if(num2 > num3){
cout << num2;
}else{
cout << num3;
}
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
int num, num1, num2, num3;
cin >> num;
num1 = num / 100;
num2 = num % 100 / 10;
num3 = num % 10;
if(num1 > num2 && num1 > num3){
cout << num1;
}else if(num2 > num3){
cout << num2;
}else{
cout << num3;
}
}