#include <bits/stdc++.h>

using namespace std;
long long x,y,prvaCifra,drugaCifra,trecaCifra;
int main()
{
   
    cin >> x >> y;
    
        if(x>y and x<10 and y<10)
    prvaCifra = x;
    else if(y>x and x<10 and y<10)
    prvaCifra = y;
    else if(y==x and x<10 and y<10)
    prvaCifra = x*11;
   
        if(x%10>y%10)
        drugaCifra = x%10;
        else if(y%10>x%10)
        drugaCifra = y%10;
        else if(x%10==y%10)
        drugaCifra = x%10*11;
        
        if(x<10 and y<10)cout << prvaCifra << endl;
        else if(x>9 and x<100 and y>9 and y<100 and (x-x%10)/10==(y-y%10)/10)cout << (x-x%10)/10 << (y-y%10)/10 << drugaCifra << endl;
        else if(x>9 and x<100 and y>9 and y<100 and x>y)cout << (x-x%10)/10 << drugaCifra << endl;
        else if(x>9 and x<100 and y>9 and y<100 and y>x)cout << (y-y%10)/10 << drugaCifra << endl;
        else if(x>9 and x<100 and y>9 and y<100 and x==y)cout << (x-x%10)/10 << (x-x%10)/10 << drugaCifra << endl;
         
        if(x<10 and y>9 and y<100 and x>(y-y%10)/10)cout << x << y%10 << endl;
        else if(x<10 and y>9 and y<100 and x<(y-y%10)/10)cout << y << endl;
        else if(x<10 and y>9 and y<100 and x==(y-y%10)/10)cout << x << y << endl;
        
        if(y<10 and x>9 and x<100 and y>(x-x%10)/10)cout << y << x%10 << endl;
        else if(y<10 and x>9 and x<100 and y<(x-x%10)/10)cout << y << x%10 << endl;
        else if(y<10 and x>9 and x<100 and y==(x-x%10)/10)cout << y << x << endl;
        
        
        
   return 0;
}