#include<iostream> #include<vector> using namespace std; int main(){ vector<int> a; int b=0; string m; int n; cin>>m>>n; for(int i=m.size()-1;i>=0;i--){ a.push_back(m[i]-'0'); } vector<int> c(a.size()+10,0); int sum=0; for(int i=a.size()-1;i>=0;i--){ a[i]+=sum*10; c.push_back(a[i]/n); sum=a[i]%n; } while(c.size()>1&&c.front()==0){ c.erase(c.begin()); } for(int i=0;i<c.size();i++){ cout<<c[i]; } return 0; }