#include <iostream>
#include<string>
#include<algorithm>
using namespace std;
int reverseNum(int n){
//将数字n转为字符串
string nStr=to_string(n);
//翻转字符串
reverse(nStr.begin(),nStr.end());
//转为数字
int res=stoi(nStr);
return res;
}
int main(){
int a,b;
cin>>a>>b;
int sum=a*b;
int res=reverseNum(sum);
cout<<res<<endl;
return 0;
}