#include <cstdio>
#include <complex>
#include <algorithm>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
typedef complex<long double> num;
const int N = 1 << 10;
char s[N + 1];
num a[N], b[N], c[N], fa[N], fb[N], fc[N];
int res[N];
void read( num *a )
{
gets(s);
for (int j = 0, i = strlen(s) - 1; i >= 0; i--)
a[j++] = num(s[i] - '0', 0);
}
void out( int *res )
{
int i = N - 1;
while (i && !res[i])
i--;
while (i >= 0)
printf("%d", res[i--]);
}
int mpos;
num mem[2 * N];
num root[N], a0[N / 2], a1[N / 2];
void fft( int n, num *a, num *fa )
{
if (n == 1)
{
fa[0] = a[0];
return;
}
int n1 = n / 2;
num *fa0 = mem + mpos; mpos += n1;
num *fa1 = mem + mpos; mpos += n1;
forn(i, n)
((i & 1) ? a1 : a0)[i / 2] = a[i];
forn(i, n1)
{
a[i] = a0[i];
a[i + n1] = a1[i];
}
fft(n1, a, fa0);
fft(n1, a + n1, fa1);
/**
A(x) = A0(x^2) + x * A1(x^2)
fa[i] = fa0[i % n1] + w^i * fa1[i % n1]
w^i = root[(N / n) * i]
*/
int step = N / n, pos = 0;
forn(i, n1)
{
/** root[(N/n)*n1] = -1 */
num tmp = root[pos] * fa1[i];
pos += step;
fa[i] = fa0[i] + tmp;
fa[i + n1] = fa0[i] - tmp;
}
mpos -= n;
}
int main()
{
forn(i, N)
root[i] = num(cos(2 * M_PI * i / N), sin(2 * M_PI * i / N));
read(a);
read(b);
fft(N, a, fa);
fft(N, b, fb);
forn(i, N)
fc[i] = fa[i] * fb[i];
fft(N, fc, c);
reverse(c + 1, c + N);
forn(i, N)
res[i] = (int)(real(c[i]) / N + 0.5);
forn(i, N - 1)
res[i + 1] += res[i] / 10, res[i] %= 10;
out(res);
}
/**
* 2 вещественных --> 1 комплексное
* a[k] = x[k] + i * y[k]
* fa[k] --> fx[k], fy[k]
* fx[k] = 0.5 * (fa[k] + conj(fa[n - k]))
*/