#include <iostream>
namespace {
unsigned numBits(unsigned val) {
// https://stackoverflow.com/a/8991271/4279
unsigned digits;
for (digits = 0; val > 0; val >>= 1)
digits++;
return digits;
}
template<class bigint>
bigint div(const bigint& lhs, const bigint& rhs) {
// https://stackoverflow.com/q/27801397/4279
bigint dividend = lhs;
bigint divisor = rhs;
int k = numBits(dividend) + numBits(divisor);
bigint pow2 = 1;
pow2 <<= k + 1;
bigint x = dividend - divisor;
bigint lastx = 0;
bigint lastlastx = 0;
while (1) {
x = (x * (pow2 - x * divisor)) >> k;
if (x == lastx || x == lastlastx) break;
lastlastx = lastx;
lastx = x;
}
bigint quotient = dividend * x >> k;
if (dividend - (quotient * divisor) >= divisor) quotient++;
return quotient;
}
}
int main() {
unsigned a, b;
return !((std::cin >> a >> b) && (std::cout << div(a, b)));
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKbmFtZXNwYWNlIHsKdW5zaWduZWQgbnVtQml0cyh1bnNpZ25lZCB2YWwpIHsKICAvLyBodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL2EvODk5MTI3MS80Mjc5CiAgdW5zaWduZWQgZGlnaXRzOwogIGZvciAoZGlnaXRzID0gMDsgdmFsID4gMDsgdmFsID4+PSAxKQogICAgICAgIGRpZ2l0cysrOwogIHJldHVybiBkaWdpdHM7Cn0KCnRlbXBsYXRlPGNsYXNzIGJpZ2ludD4KYmlnaW50IGRpdihjb25zdCBiaWdpbnQmIGxocywgY29uc3QgYmlnaW50JiByaHMpIHsKICAgIC8vIGh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcS8yNzgwMTM5Ny80Mjc5CiAgICBiaWdpbnQgZGl2aWRlbmQgPSBsaHM7CiAgICBiaWdpbnQgZGl2aXNvciA9IHJoczsKCiAgICBpbnQgayA9IG51bUJpdHMoZGl2aWRlbmQpICsgbnVtQml0cyhkaXZpc29yKTsKICAgIGJpZ2ludCBwb3cyID0gMTsKICAgIHBvdzIgPDw9IGsgKyAxOwoKICAgIGJpZ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