#include <bits/stdc++.h>
using namespace std;
int main() {
    int x,y;cin>>x>>y;
int np1,np2;
if(x/10 > y/10)
    np1= x/10;
else 
    np1= y/10;
if (x%10> y%10)
    np2=x%10;
else 
    np2 = y%10;

string s1 =to_string(np1);
string s2 =to_string(np2);

string s = s1 + s2;

int rez = stoi(s);

cout<<rez<<endl;
return 0;}