#include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <chrono>
#include <sstream>
#include <algorithm>
#include <cmath>
using namespace std;
typedef vector<int> vi;
typedef vector<long long> vll;
const int BASE = (int)1e9;
const int base_d = 9; //Store 9 digits in one element
void fix_vll(vll& a) {
a.push_back(0);
for (int i = 0; i < a.size() - 1; i++) {
a[i + 1] += a[i] / BASE;
a[i] %= BASE;
if (a[i] < 0) {
long long tmp = ceil(-1.0 * a[i] / BASE);
a[i + 1] -= tmp;
a[i] += tmp * BASE;
}
}
while (a.size() >= 2 && a.back() == 0) a.pop_back();
}
class BigInt{
private:
vi a;
int sign;
public:
int size(){
if(a.empty())return 0;
int ans=(a.size()-1)*base_d;
int ca=a.back();
while(ca)
ans++,ca/=10;
return ans;
}
BigInt(){
sign = 1;
}
BigInt(long long v){
*this = v;
}
void fix(){
while(!a.empty() && !a.back())
a.pop_back();
if(a.empty())
sign = 1;
}
void get(const string& s){
sign = 1;
a.clear();
int pos = 0;
while (pos < (int) s.size() && (s[pos] == '-' || s[pos] == '+')) {
if (s[pos] == '-')
sign = -sign;
++pos;
}
for (int i = s.size() - 1; i >= pos; i -= base_d) {
int x = 0;
for (int j = max(pos, i - base_d + 1); j <= i; j++)
x = x * 10 + s[j] - '0';
a.push_back(x);
}
fix();
}
void operator=(long long v){
sign = 1;
a.clear();
if(v < 0){
sign = -1;
v = -v;
}
while(v > 0){
a.push_back(v % BASE);
v /= BASE;
}
}
void operator=(const BigInt& other){
sign = other.sign;
a = other.a;
}
BigInt abs() const {
BigInt res = *this;
res.sign = 1;
return res;
}
BigInt operator-() const {
BigInt res = *this;
res.sign = -res.sign;
return res;
}
bool operator<(const BigInt& other) const {
if(sign != other.sign){ // -3 1 || 3 -1
return sign < other.sign;
}
if(a.size() != other.a.size()){ //-123 2 || 23 -123
return a.size() * sign < other.a.size() * other.sign;
}
for(int i = a.size() - 1; i >= 0; --i){
if(a[i] != other.a[i])
return a[i] * sign < other.a[i] * other.sign;
}
return 0;
}
bool operator>(const BigInt& other) const {// a > b -> b < a
return other < *this;
}
bool operator>=(const BigInt& other) const {// a >= b -> !(a < b)
return !(*this < other);
}
bool operator<=(const BigInt& other) const {// a <= b -> !(a > b)
return !(other < *this);
}
bool operator==(const BigInt& other) const {
return !(*this < other) && !(other < *this);
}
friend BigInt operator+(const BigInt&, const BigInt&);
friend BigInt operator-(const BigInt&, const BigInt&);
void operator*=(int v) {
if(v < 0){
sign = -sign;
v = -v;
}
for(int i = 0, carry = 0; i < a.size() || carry; ++i){
if(i == a.size())
a.push_back(0);
long long t = a[i] * (long long)v + carry;
carry = (int)(t / BASE);
a[i] = (int)(t % BASE);
}
fix();
}
void operator*=(long long other){
if(other < 0){
sign = -sign;
other = -other;
}
if(other > BASE){
*this = *this * (other / BASE) * BASE + *this * (other % BASE);
return ;
}
for(int i = 0, carry = 0; i < a.size() || carry; ++i){
if(i == a.size())
a.push_back(0);
long long t = a[i] * (long long)other + carry;
carry = (int)(t / BASE);
a[i] = (int)(t % BASE);
}
fix();
}
BigInt operator*(int v) const {
BigInt res = *this;
res *= v;
return res;
}
BigInt operator*(long long other) const {
BigInt res = *this;
res *= other;
return res;
}
friend istream& operator>>(istream& cin, BigInt &a){
string s;
cin >> s;
a.get(s);
return cin;
}
friend ostream& operator<<(ostream& cout, const BigInt &a){
if(a.sign == -1)
cout << "-";
cout << (a.a.empty() ? 0 : a.a.back());
for(int i = a.a.size() - 2; i >= 0; --i){
cout << setw(base_d) << setfill('0') << a.a[i];
}
return cout;
}
void operator+=(const BigInt& other){
*this = *this + other;
}
void operator-=(const BigInt& other){
*this = *this - other;
}
void operator*=(const BigInt& other){
*this = *this * other;
}
void operator/=(const BigInt& other){
*this = *this / other;
}
void operator/=(int other) {
if (other< 0)
sign = -sign, other = -other;
for (int i = (int) a.size() - 1, rem = 0; i >= 0; --i) {
long long cur = a[i] + rem * (long long) BASE;
a[i] = (int) (cur / other);
rem = (int) (cur % other);
}
fix();
}
BigInt operator/(int other) const {
BigInt res = *this;
res /= other;
return res;
}
friend pair<BigInt, BigInt> div(const BigInt &a1, const BigInt &b1) {
int norm = BASE / (b1.a.back() + 1);
BigInt a = a1.abs() * norm;
BigInt b = b1.abs() * norm;
BigInt q, r;
q.a.resize(a.a.size());
for (int i = a.a.size() - 1; i >= 0; i--) {
r *= BASE;
r += a.a[i];
int s1 = r.a.size() <= b.a.size() ? 0 : r.a[b.a.size()];
int s2 = r.a.size() <= b.a.size() - 1 ? 0 : r.a[b.a.size() - 1];
int d = ((long long) BASE * s1 + s2) / b.a.back();
r -= b * d;
while (r < 0)
r += b, --d;
q.a[i] = d;
}
q.sign = a1.sign * b1.sign;
r.sign = a1.sign;
q.fix();
r.fix();
return make_pair(q, r / norm);
}
BigInt operator/(const BigInt& other) const {
return div(*this, other).first;
}
BigInt operator%(const BigInt& other) const {
return div(*this, other).second;
}
static vll karatsubMultiply(const vll& a, const vll& b){
int n = a.size();
vll res(n + n);
if(n <= 32){
for (int i = 0; i < a. size(); ++i) {
for (int j = 0; j < b.size(); ++j) {
res[i + j] += a[i] * b[j];
res[i + j + 1] += res[i + j] / BASE;
res[i + j] %= BASE;
}
}
return fix_vll(res), res;
}
int k = n >> 1;
vll a1(k), a2(k), b1(k), b2(k);
for(int i = 0; i < k; ++i){
a1[i] = a[i];
b1[i] = b[i];
a2[i] = a[i + k];
b2[i] = b[i + k];
}
vll a1b1 = karatsubMultiply(a1, b1);
vll a2b2 = karatsubMultiply(a2, b2);
for (int i = 0; i < k; i++)
a2[i] += a1[i];
for (int i = 0; i < k; i++)
b2[i] += b1[i];
vll r = karatsubMultiply(a2, b2);
for (int i = 0; i < (int) a1b1.size(); i++)
r[i] -= a1b1[i];
for (int i = 0; i < (int) a2b2.size(); i++)
r[i] -= a2b2[i];
for (int i = 0; i < (int) r.size(); i++)
res[i + k] += r[i];
for (int i = 0; i < (int) a1b1.size(); i++)
res[i] += a1b1[i];
for (int i = 0; i < (int) a2b2.size(); i++)
res[i + n] += a2b2[i];
return fix_vll(res), res;
}
BigInt operator*(const BigInt& other) const {
vi a1 = this->a;
vi b1 = other.a;
vll a(a1.begin(), a1.end());
vll b(b1.begin(), b1.end());
while(a.size() < b.size())
a.push_back(0);
while(b.size() < a.size())
b.push_back(0);
while (a.size() & (a.size() - 1))
a.push_back(0), b.push_back(0);
vll res = karatsubMultiply(a, b);
fix_vll(res);
stringstream ss;
ss << (res.empty() ? 0 : res.back());
for(int i = res.size() - 2; i >= 0; --i){
ss << setw(base_d) << setfill('0') << res[i];
}
string s;
ss >> s;
if(sign * other.sign == -1)
s = "-" + s;
BigInt ret;
ret.get(s);
ret.fix();
return ret;
}
};
BigInt operator-(const BigInt& a, const BigInt& other) {
if(a.sign == other.sign){
if(a.abs() >= other.abs()){// a > b -> a - b;
BigInt res = a;
for(int i = 0, carry = 0; i < other.a.size() || carry; ++i){
res.a[i] -= carry;
if(i < other.a.size())
res.a[i] -= other.a[i];
carry = (res.a[i] < 0);
if(carry)
res.a[i] += BASE;
}
res.fix();
return res;
}
return -(other - a); //a < b -> a - b = -(b - a)
}
return a + (-other);
}
BigInt operator+(const BigInt& th, const BigInt& other){
if(th.sign == other.sign){
BigInt res = other;
for(int i = 0, carry = 0; i < max(th.a.size(), other.a.size()) || carry; ++i){
if(i == res.a.size())
res.a.push_back(0);
res.a[i] += carry;
if(i < th.a.size())
res.a[i] += th.a[i];
carry = (res.a[i] >= BASE);
if(carry)
res.a[i] -= BASE;
}
return res;
}
return th - (-other);
}
BigInt powMod(BigInt a, BigInt b, const BigInt& m){
BigInt res = 1;
a = a % m;
while(b > 0){
if(b % 2 == 1){
res = (res * a) % m;
}
a = (a * a) % m;
b /= 2;
}
return res;
}
class Timer {
private:
std::chrono::high_resolution_clock::time_point last_time;
public:
Timer();
void start();
int64_t getRunningTime();
};
Timer::Timer() {
last_time = std::chrono::high_resolution_clock::now();
}
void Timer::start() {
last_time = std::chrono::high_resolution_clock::now();
}
//return in nanosecond
int64_t Timer::getRunningTime() {
auto cur_time = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds> (cur_time - last_time);
return duration.count();
}
int main(){
//freopen("input.txt", "r", stdin);
// freopen("output1.txt", "w", stdout);
// BigInt a, b, c, re;
// cin >> a >> b >> c;
// Timer timer;
// timer.start();
// re = powMod(a, b, c);
// int64_t runningtime = timer.getRunningTime();
// cout << "Runing time: " << runningtime / 1000000000.0 << "secs\n";
// cout << re;
BigInt a, b;
cin >> a >> b;
cout << a * b;
return 0;
}