#include <cstdio>
#include <algorithm>

using namespace std;

    int a,b,c,d;

int main(){
    scanf("%d %d",&a,&b);
    while( a > 0){
        c = c * 10 + a % 10;
        a /= 10;
    }
    while ( b > 0){
        d = d * 10 + b % 10;
        b /= 10;
    }
    printf("%d\n",max(c,d));
    return 0;
}
