#include <iostream>
#include <string>
using namespace std;
int main() {
string a;
int b, rem = 0;
cin >> a >> b;
string res;
for (char c : a) {
rem = rem * 10 + (c - '0'); // 计算当前待除数值
res += (rem / b) + '0'; // 记录当前位商
rem %= b; // 更新余数
}
// 跳过前导零
size_t i = 0;
while (i < res.size() && res[i] == '0') i++;
// 输出结果(全零则输出0)
cout << (i == res.size() ? "0" : res.substr(i)) << endl;
return 0;
}
/**************************************************************
Problem: 1604
User: hongjiaming
Language: C++
Result: Accepted
Time:47 ms
Memory:2076 kb
****************************************************************/