#include using namespace std; int main(){ int X,Y,L; cin >> X >> Y >> L; int dir; if(abs(X) % L)dir = abs(X) / L + 1; else dir = abs(X) / L; if(abs(Y) % L)dir += abs(Y) / L + 1; else dir += abs(Y) / L; if(Y < 0)dir += 2; else if(X != 0)dir++; cout << dir << endl; return 0; }