#include using namespace std; int main() { int x, y, stp, a, b, count = 0; cin >> x >> y >> stp; if (x != 0) { if (y >= 0) count++; else count += 2; } else { if (y < 0) count += 2; } a = abs(x) / stp; if (x % stp != 0) a++; b = abs(y) / stp; if (y % stp != 0) b++; count += a + b; cout << count << endl; return 0; }