#include <cstdio>

int main(){
	int a[4];
	for(int i=0; i < 4;i++){
		scanf("%d", &a[i]);
	}
	int min_a = a[0];
	for(int i = 1; i < 4; i++)
		if(a[i] < min_a)
			min_a = a[i];
	printf("%d\n", min_a);
}
#include <algorithm>
#include<iostream>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<set>
#include<string>
#include <sstream>
#include<bitset>

#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<limits.h>
const int INF = 0x7fffffff;
using lll = long long;
using ull = unsigned long long;
using namespace std;


int main(){
  lll ii,jj,kk;
  vector<int> ret;
  string s;
  cin >> s;

  cout << s[1] << s[2] << s[0] << endl;

  return 0;
}
