#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,b,c,d,t;
cin>>a>>b>>c>>d;
if(a<b) {t=a;a=b;b=t;}
if(a<c) {t=a;a=c;c=t;}
if(a<d) {t=a;a=d;d=t;}
cout<<a;
return 0;
}
/**************************************************************
Problem: 1305
User: ccf
Language: C++
Result: Accepted
Time:12 ms
Memory:2072 kb
****************************************************************/