#include<bits/stdc++.h>
using namespace std;
string x,y;
int a[100010],b[100010],c[100010],sub[100010],xa,xb,xc,xs,con;
int main(){
cin>>x>>y;
xa=x.length(),xb=y.length();
xc=xa-xb+1;
for(int i=0;i<xa;i++) a[xa-i]=x[i]-'0';
for(int i=0;i<xb;i++) b[xb-i]=y[i]-'0';
for(int i=xc;i>=1;i--){
for(int j=1;j<=xb;i++) sub[j+i-1]=b[j];
xs=xb+i-1;
if(xa>xs) con=1;
else if(xa<xs) con=-1;
else{
for(int i=xa;i>=1;i--){
if(a[i]>sub[i]) con=1;
if(a[i]<sub[i]) con=-1;
}
}
while(con>=0){
c[i]++;
for(int i=1;i<=xa;i++){
if(a[i]<b[i]){
a[i]+=10;
a[i+1]--;
}
a[i]-=sub[i];
}
while(a[xa]==0&&xa>1) xa--;
}
}
while(c[xc]==0&&xc>1) xc--;
for(int i=xc;i>=1;i--) cout<<c[i];
/*for(int i=xa;i>=1;i--) cout<<a[i];
输出余数*/
}