#include #include using namespace std; int main() { int x, y, l; cin >> x >> y >> l; int cntx = (abs(x) + l - 1) / l; int cnty = (abs(y) + l - 1) / l; int rot; if (y > 0) { if (x == 0) rot = 0; else rot = 1; } else if (y == 0) { if (x == 0) rot = 0; else rot = 1; } else { rot = 2; } cout << cntx + cnty + rot << endl; return 0; }