#line 1 "main.cpp"

#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/problems/NTL_2_F"

#line 2 "/Users/kodamankod/Desktop/Programming/Library/algebraic/fft.cpp"

#line 2 "/Users/kodamankod/Desktop/Programming/Library/other/bit_operation.cpp"

#include <cstddef>
#include <cstdint>

constexpr size_t count_zero_right(const uint64_t x) {
  return x == 0 ? 64 : __builtin_ctzll(x);
}

constexpr size_t count_zero_left(const uint64_t x) {
  return x == 0 ? 64 : __builtin_clzll(x);
}

constexpr size_t bit_width(const uint64_t x) { 
  return 64 - count_zero_left(x);
}

constexpr uint64_t most_significant_bit(const uint64_t x) {
  return x == 0 ? 0 : uint64_t(1) << (bit_width(x) - 1);
}

constexpr uint64_t least_significant_bit(const uint64_t x) {
  return x & (-x);
}

constexpr uint64_t next_power_of_two(const uint64_t x) {
  return x == 0 ? 0 : most_significant_bit(2 * x - 1);
}

constexpr uint32_t bit_reverse_32(uint32_t x) {
  constexpr uint32_t b16 = 0b00000000000000001111111111111111;
  constexpr uint32_t  b8 = 0b00000000111111110000000011111111;
  constexpr uint32_t  b4 = 0b00001111000011110000111100001111;
  constexpr uint32_t  b2 = 0b00110011001100110011001100110011;
  constexpr uint32_t  b1 = 0b01010101010101010101010101010101;
  x = ((x >> 16) & b16) | ((x & b16) << 16);
  x = ((x >>  8) &  b8) | ((x &  b8) <<  8);
  x = ((x >>  4) &  b4) | ((x &  b4) <<  4);
  x = ((x >>  2) &  b2) | ((x &  b2) <<  2);
  x = ((x >>  1) &  b1) | ((x &  b1) <<  1);
  return x;
}
#line 4 "/Users/kodamankod/Desktop/Programming/Library/algebraic/fft.cpp"
#include <cmath>
#line 6 "/Users/kodamankod/Desktop/Programming/Library/algebraic/fft.cpp"
#include <vector>
#include <utility>

template <class T>
class fast_fourier_transform {
public:
  using value_type = T;
  using size_type = size_t;
  static constexpr value_type pi = std::acos(value_type(-1.0));

  struct complex_type {
    value_type re, im;
    constexpr complex_type(value_type re_ = 0, value_type im_ = 0): re(re_), im(im_) { }
    constexpr complex_type operator + (const complex_type &rhs) const { 
      return complex_type(re + rhs.re, im + rhs.im); 
    }
    constexpr complex_type operator - (const complex_type &rhs) const { 
      return complex_type(re - rhs.re, im - rhs.im); 
    }
    constexpr complex_type operator * (const complex_type &rhs) const { 
      return complex_type(re * rhs.re - im * rhs.im, re * rhs.im + im * rhs.re); 
    }
  };

private:
  size_type M_size;
  std::vector<complex_type> M_root;

public:
  void reserve(size_type size) {
    M_size = next_power_of_two(size);
    M_root.assign(M_size + 1, complex_type());
    for (size_type i = 0; i <= M_size; ++i) {
      value_type angle = pi * value_type(2.0) / M_size * i;
      M_root[i].re = std::cos(angle);
      M_root[i].im = std::sin(angle);
    }
  }

  void transform(std::vector<complex_type> &F) const {
    size_type logn = count_zero_right(M_size);
    for (size_type i = 0; i < M_size; ++i) {
      size_type j = bit_reverse_32(i) >> (32 - logn);
      if (i < j) {
        std::swap(F[i], F[j]);
      }
    }
    size_type idx;
    complex_type first, second;
    for (size_type len = 1, bit = M_size >> 1; len < M_size; len <<= 1, bit >>= 1) {
      for (size_type k = 0; k < M_size; k += (len << 1)) {
        idx = 0;
        for (size_type i = 0; i < len; ++i) {
          first = F[i + k], second = F[(i + k) ^ len];
          F[i + k] = M_root[0] * first + M_root[idx] * second;
          F[(i + k) ^ len] = M_root[0] * first + M_root[idx + (M_size >> 1)] * second;
          idx += bit;
        }
      }
    }
  }

  void inv_transform(std::vector<complex_type> &F) const {
    size_type logn = count_zero_right(M_size);
    for (size_type i = 0; i < M_size; ++i) {
      size_type j = bit_reverse_32(i) >> (32 - logn);
      if (i < j) {
        std::swap(F[i], F[j]);
      }
    }
    size_type idx;
    complex_type first, second;
    for (size_type len = 1, bit = M_size >> 1; len < M_size; len <<= 1, bit >>= 1) {
      for (size_type k = 0; k < M_size; k += (len << 1)) {
        idx = M_size;
        for (size_type i = 0; i < len; ++i) {
          first = F[i + k], second = F[(i + k) ^ len];
          F[i + k] = M_root[0] * first + M_root[idx] * second;
          F[(i + k) ^ len] = M_root[0] * first + M_root[idx - (M_size >> 1)] * second;
          idx -= bit;
        }
      }
    }
  }

  template <class U>
  std::vector<U> convolve(const std::vector<U> &A, const std::vector<U> &B) {
    size_type res_size = A.size() + B.size() - 1;
    reserve(res_size);
    std::vector<complex_type> C(M_size), D(M_size);
    for (size_type i = 0; i < A.size(); ++i) {
      C[i].re = static_cast<value_type>(A[i]);
    }
    for (size_type i = 0; i < B.size(); ++i) {
      D[i].re = static_cast<value_type>(B[i]);
    }
    transform(C);
    transform(D);
    for (size_type i = 0; i < M_size; ++i) {
      C[i] = C[i] * D[i];
    }
    inv_transform(C);
    std::vector<U> res(res_size);
    for (size_type i = 0; i < res_size; ++i) {
      res[i] = static_cast<U>(C[i].re / M_size + value_type(0.5));
    }
    return res;
  }

};
#line 5 "main.cpp"

#line 7 "main.cpp"
#include <string>
#include <iostream>
#include <algorithm>
#line 12 "main.cpp"
#include <cstdlib>

int main() {
  std::string A, B;
  std::cin >> A >> B;
  bool negative = false;
  auto fix = [&](std::string &&S) -> std::vector<uint32_t> {
    if (S == "0") {
      std::cout << "0\n";
      std::exit(EXIT_SUCCESS);
    }
    std::reverse(S.begin(), S.end());
    if (S.back() == '-') {
      negative ^= 1;
      S.pop_back();
    }
    std::vector<uint32_t> res(S.size());
    std::transform(S.begin(), S.end(), res.begin(), [&](auto c) {
      return c - '0';
    });
    return res;
  };
  fast_fourier_transform<double> fft;
  auto C = fft.convolve(fix(std::move(A)), fix(std::move(B)));
  std::vector<char> ans;
  ans.reserve(C.size());
  uint32_t sum = 0;
  for (auto x: C) {
    sum += x;
    ans.push_back((sum % 10) + '0');
    sum /= 10;
  }
  while (sum > 0) {
    ans.push_back((sum % 10) + '0');
    sum /= 10;
  }
  if (negative) {
    ans.push_back('-');
  }
  std::reverse(ans.begin(), ans.end());
  for (auto x: ans) {
    std::cout << x;
  }
  std::cout << '\n';
  return 0;
}



Measured memory_bytes: 31636