#include <iostream>
using namespace std;
long long n, num;
short k, cif, c, i, v[20];
int main()
{
cout << "n= "; cin >> n;
cout << "k= "; cin >> k;
while (n)
{
cif=n%10;
++c; v[c]=cif;
n/=10;
}
for (i=c; i>0; --i)
if (i!=c-k+1) num=num*10+v[i];
cout << num;
}