//Yousefi, Irysc.com
#include <iostream>
using namespace std;
int main()
{
int a[5];
for(int i = 0; i < 5; i++)
cin >> a[i];
for(int i = 0; i < 4; i++)
if(a[i + 1] < a[i])
swap(a[i], a[i + 1]);
cout << a[4] << endl;
return 0;
}
//Yousefi, Irysc.com
#include <iostream>
using namespace std;
typedef unsigned int ui;
ui mod(ui a, ui b)
{
if(a < b)
return a;
else
return mod(a - b, b);
}
int main()
{
ui a, b;
cin >> a >> b;
a > b ? swap(a, a) : swap(a, b);
cout << mod(a, b) << endl;
}
//Yousefi, Irysc.com
#include <iostream>
using namespace std;
typedef unsigned int ui;
ui big(ui a, ui m)
{
if(!(a / 10) && m > a % 10)
return m;
else if(!(a / 10))
return a;
else if(a % 10 > m)
m = a % 10;
return big(a / 10, m);
}
int main()
{
ui a;
cin >> a;
cout << big(a, 0) << endl;
}