const int blen = 7;
const unsigned base = (int)1e7;
const int mlen = 1 << 15;

#include "..\\base.cpp"

#define max_mem (mlen * 2)

int mpos = 0;
ll mem[max_mem];

void Mul( int n, ll *c, ll *a, ll *b )
{
  if (n <= 16)
  {
    memset(c, 0, sizeof(c[0]) * (n * 2));
    forn(i, n)
      forn(j, n)
        c[i + j] += a[i] * b[j];
    return;
  }

  int n1 = n / 2;
  Mul(n1, c, a, b);
  Mul(n1, c + n, a + n1, b + n1);

  ll *a1 = mem + mpos; mpos += n1;
  ll *b1 = mem + mpos; mpos += n1;
  ll *c1 = mem + mpos; mpos += n;
  assert(mpos <= max_mem);

  forn(i, n1)
  {
    a1[i] = a[i] + a[i + n1];
    b1[i] = b[i] + b[i + n1];
  }
  Mul(n1, c1, a1, b1);
  forn(i, n)
    c1[i] -= c[i] + c[i + n];
  forn(i, n)
    c[i + n1] += c1[i];

  mpos -= 2 * n;
}

void Cor( ll *c )
{
  forn(i, mlen)
    if (c[i] >= base)
      c[i + 1] += c[i] / base, c[i] %= base; 
}

num a, b, c;

int main()
{
  Read(a);
  Read(b);
  assert(Len(a) + Len(b) <= mlen);

  int len = mlen, x = max(Len(a), Len(b));
  while (len / 2 >= x)
    len /= 2;
  Mul(len, c, a, b);

  Cor(c);
  Out(c);
  return 0;
}