#include<iostream> #include<cstring> #include<cstdio> using namespace std; int lena,c[1001],a[1001],b,lenc,k=0; char a1[1001]; int main(){ scanf("%s",a1); cin>>b; lena=strlen(a1); for(int i=0;i<lena;i++)a[i]=a1[i]-'0'; /* for(int i=0;i<lenb;i++)b[i]=b1[lenb-i+1]-'0';*/ for(int i=0;i<=lena-1;i++) { c[i]=a[i]/b; a[i+1]+=(a[i]%b)*10; } while(c[k]==0)k++; for(int i=k;i<=lena-1;i++) printf("%d",c[i]); return 0; }