#include<iostream> #include<vector> using namespace std; int main(){ string a; int sam=0,b; cin>>a>>b; vector<int> c,d; for(int i=a.size()-1;i>-1;i--){ c.push_back(a[i]-'0'); } for(int i=0;i<a.size()||sam!=0;i++){ if(i>=a.size()){ c[i]=0; } sam=c[i]*b+sam; d.push_back(sam%10); sam/=10; } while(d.size()>1&&d.back()==0){ d.pop_back(); } for(int i=d.size()-1;i>=0;i--){ cout<<d[i]; } return 0; }