#include using namespace std; int main() { int X, Y, L; cin >> X >> Y >> L; cout << (abs(X) + L - 1) / L + (abs(Y) + L - 1) / L + (X > 0 & Y > 0) << endl; }