#include<bits/stdc++.h>
using namespace std;
const int N=1e6+10;
vector<int>mul(vector <int>&A,int b){
int t=0;
vector<int>c;
for(int i=0;i<A.size();i++){
if(i<A.size())t+=A[i]*b;
c.push_back(t%10);
t/=10;
}
if(t!=0)c.push_back(t);
while(c.size()>1&&c.back()==0)c.pop_back();
return c;
}
int main(){
vector<int>A,c;
string a;
int b;
cin>>a>>b;
for(int i=a.size()-1;i>=0;i--)A.push_back(a[i]-'0');
c=mul(A,b);
for(int i=c.size()-1;i>=0;i--){
cout<<c[i];
}
}