#include //cin, cout #include //vector #include //sort,min,max #include //string #include //fixed #include //setprecision #include //swap #include //abs(int) using namespace std; int main() { int X, Y, L; cin >> X >> Y >> L; if (X == 0 && Y == 0) { cout << 0 << endl; return 0; } int ans = ((abs(X) + L - 1) / L) + ((abs(Y) + L - 1) / L); if (Y < 0) { ans += 2; } else { if (X != 0) { ans++; } } cout << ans << endl; return 0; }