#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<bitset>
#include<math.h>
#include<cstdio>
#include<vector>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int N=50010;
const int MAX=151;
const int mod=100000000;
const int MOD1=100000007;
const int MOD2=100000009;
const double EPS=0.00000001;
typedef long long ll;
const ll MOD=1000000009;
const ll INF=10000000010;
typedef double db;
typedef unsigned long long ull;
ll G=3,P=469762049,a[3*N],b[3*N],wn[25];
char s[N],t[N];
ll q_pow(ll a,ll b,ll M) {
ll ret=1;a%=M;
while (b) {
if (b&1) ret=ret*a%M;
a=a*a%M;
b>>=1;
}
return ret;
}
void getwn() {
for (int i=0;i<25;i++) wn[i]=q_pow(G,(P-1)/(1<<i),P);
}
void NTT(ll x[],int n,int rev) {
int i,j,k,t,ds,id=0;
ll w,u,v;
for (i=1,j=n>>1,k=n>>1;i<n-1;i++,k=n>>1) {//Rader
if (i<j) swap(x[i],x[j]);
while (j>=k) { j-=k;k>>=1; }
if (j<k) j+=k;
}
for (i=2,ds=1;i<=n;i<<=1,ds++)
for (j=0;j<n;j+=i) {
w=1;
for (k=j;k<j+i/2;k++) {
u=x[k]%P;v=w*x[k+i/2]%P;
x[k]=(u+v)%P;
x[k+i/2]=(u-v+P)%P;
w=w*wn[ds]%P;
}
}
if (rev==-1) {
for (i=1;i<n/2;i++) swap(x[i],x[n-i]);
w=q_pow(n,P-2,P);
for (i=0;i<n;i++) x[i]=x[i]*w%P;
}
}
void solve() {
int i,n=1,les=strlen(s),let=strlen(t);
while (n<les+let) n<<=1;
for (i=0;i<les;i++) a[i]=s[les-i-1]-'0';
for (i=les;i<n;i++) a[i]=0;
for (i=0;i<let;i++) b[i]=t[let-i-1]-'0';
for (i=let;i<n;i++) b[i]=0;
NTT(a,n,1);NTT(b,n,1);
for (i=0;i<n;i++) a[i]=a[i]*b[i]%P;
NTT(a,n,-1);
for (i=0;i<n-1;i++) a[i+1]+=a[i]/10,a[i]%=10;
while (a[n-1]>10) { a[n]+=a[n-1]/10;a[n-1]%=10;n++; }
while (n>1&&!a[n-1]) n--;
for (i=n-1;i>=0;i--) printf("%I64d", a[i]);
printf("\n");
}
int main()
{
getwn();
while (scanf("%s%s", s, t)!=EOF) solve();
return 0;
}
/*
常用费马素数P=r*2^k+1,g为P的原根
P r k g
3 1 1 2
5 1 2 2
17 1 4 3
97 3 5 5
193 3 6 5
257 1 8 3
7681 15 9 17
12289 3 12 11
40961 5 13 3
65537 1 16 3
786433 3 18 10
5767169 11 19 3
7340033 7 20 3
23068673 11 21 3
104857601 25 22 3
167772161 5 25 3
469762049 7 26 3
1004535809 479 21 3
2013265921 15 27 31
2281701377 17 27 3
3221225473 3 30 5
75161927681 35 31 3
77309411329 9 33 7
*/