#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;
	return 0;	
	}
/**************************************************************
	Problem: 1305
	User: fuhoubin
	Language: C++
	Result: Accepted
	Time:12 ms
	Memory:2072 kb
****************************************************************/