#include<string>
#include<fstream>
using namespace std;
ifstream fin("input.txt");
ofstream fout("out.txt");
string chengfa(string s1,string s2);
string xjiafa(string s1,string s2);
string clear(string s);
void main()
{
int ii=1;
bool isnum=true;
string a,b;
fin>>a;
fin>>b;
if(a[0]>'9' && a[0]<'0' && a[0]!='-'){
fout<<"Wrong Input!";
isnum = false;
}
else
if (b[0]>'9' && b[0]<'0' && b[0]!='-'){
fout<<"Wrong Input!";
isnum = false;
}
while(ii<a.length()){
if(a[ii]>'9' || a[ii]<'0'){
fout<<"Wrong Input!";
isnum = false;
break;
}
ii++;
}
ii = 1;
while(ii<b.length()){
if(b[ii]>'9' || b[ii]<'0'){
fout<<"Wrong Input!";
isnum = false;
break;
}
ii++;
}
if (isnum){
string nag = "";
if(a[0]=='-' && b[0]=='-'){
nag = "";
a = a.substr(1,a.length()-1);
b = b.substr(1,b.length()-1);
}
else
if(a[0]=='-'){
nag = "-";
a = a.substr(1,a.length()-1);
}
else
if(b[0]=='-'){
nag = "-";
b = b.substr(1,b.length()-1);
}
fout<<nag<<chengfa(a,b);
}
}
string chengfa(string s1,string s2){
string result="0";
for(int i=s2.length()-1;i>=0;i--){
for (int j=1;j<=s2[i]-'0';j++)
result = xjiafa(s1,result);
s1 = s1 + '0';
}
return result;
}
string xjiafa(string s1,string s2){
while (s1.length()<s2.length())
s1='0'+s1;
while (s1.length()>s2.length())
s2='0'+s2;
s1='0'+s1;
s2='0'+s2;
for (int i=(s1.length()-1);i>0;i--){
s1[i] = s1[i]+s2[i]-'0';
if(s1[i]>'9'){
s1[i-1] = s1[i-1] + 1;
int k=1;
while (s1[i-k]=='9'+1){
s1[i-k] = '0';
s1[i-k++] = s1[i-k++] + 1;
}
s1[i] = s1[i] - 10;
}
}
return clear(s1);
}
string clear(string s){
if (s.length()==0)
s="0";
if (s[0]=='-')
s = s.substr(1,(s.length()-1));
while (s.length()>0 && s[0]=='0')
s = s.substr(1,(s.length()-1));
if (s.length()==0)
s="0";
return s;
}