#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(NULL);
int a, b;
cin >> a >> b;
int na = 0, nb = 0;
na += a / 100;
a %= 100;
na += (a / 10) * 10;
a %= 10;
na += a * 100;
nb += b / 100;
b %= 100;
nb += (b / 10) * 10;
b %= 10;
nb += b * 100;
if (na > nb) cout << na;
if (na < nb) cout << nb;
return 0;
}