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