#include<bits/stdc++.h>
using namespace std;
int x,z,a,b;
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
     

return 0;
}