#include using namespace std; int main() { int x,y,l,cx,cy; cin >> x >> y >> l; cx = 0; cy = 0; if (x < 0) { x = -x; } if (y < 0) { y = -y; } if (x % l == 0) { cx = x / l; }else{ cx = x / l + 1; } if (y % l == 0) { cy = y / l; }else{ cy = y / l + 1; } if (x != 0 && y != 0) { cout << cx + cy + 1 << "\n"; }else{ cout << cx + cy << "\n"; } return 0; }