#include<bits/stdc++.h>
using namespace std;
int x,z,a,b,c,d;
int main(){
  cin>>x>>z;
  a=x;
  b=z;

 while (a>=10){
    a=a/10;
  }
  while (b>=10){
  b=b/10;
  }
if (a>b)
    cout<<a;
else  if (b>a)
    cout<<b;
else  if(a=b)
    cout<<a<<b;
else
    cout<<b;
// druga cifra
c=x;
d=z;
  while (c>=100){
    c=c/10;
  }
  c=c-a*10;
  while (d>=100){
  d=d/10;
  }
  d=d-b*10;
if (c>d)
    cout<<c;
else  if (d>c)
    cout<<d;
else  if(c=d)
    cout<<c<<d;
else
    cout<<d;
//treca cifra

return 0;
}