#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 DEG = 10;
const int N = 1 << DEG;

char s[N + 1];
num a[N], b[N], c[N], fa[N], fb[N], fc[N];
int res[N];
int rev[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--]);
}

num root[N];

void fft( num *a, num *fa )
{
  forn(i, N)
    fa[rev[i]] = a[i];

  int cnt = 0, step = N;
  for (int n1 = 1; n1 < N; n1 <<= 1)
  {
    step >>= 1;
    num *b = a, *fa0 = fa, *fa1 = fa0 + n1;
    for (int sh = 0; sh < N; sh += n1 << 1)
    {
      int pos = 0;
      forn(i, n1)
      {
        num tmp = root[pos] * *fa1; 
        pos += step;
        *b        = *fa0 + tmp;
        *(b + n1) = *fa0 - tmp;
        fa0++, fa1++, b++;
      }
      b += n1, fa0 += n1, fa1 += n1;
    }
    swap(a, fa), cnt++;
  }
  if (cnt & 1)
    memcpy(a, fa, sizeof(a[0]) * N);
}

int main()
{
  forn(i, N)
    root[i] = num(cos(2 * M_PI * i / N), sin(2 * M_PI * i / N));
  forn(i, N)
    rev[i] = (rev[i / 2] >> 1) + ((i & 1) << (DEG - 1));

  read(a);
  read(b);

  fft(a, fa);
  fft(b, fb);
  
  forn(i, N)
    fc[i] = fa[i] * fb[i];
  
  fft(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]))
 */