#include<iostream>
#include<vector>
#include<string>
using namespace std;
vector<int> mul(vector<int>& a, int b)
{
int t = 0;
vector<int> c;
for (int j = 0; j < a.size()||t; j++)
{
if(j < a.size())
t += a[j] * b;
c.push_back(t % 10);
t /= 10;//标志进位
}
while (c.size() > 1 && c.back() == 0)
c.pop_back();
return c;
}
int main()
{
string n;
int m;
cin >> n >> m;
vector<int> a, c;
for (int i = n.size() - 1; i >= 0; i--)
a.push_back(n[i] - '0');
c = mul(a,m);
for (int i = c.size() - 1; i >= 0; i--)
{
cout << c[i];
}
}