#include #include #include #include using namespace std; int main() { int x, y, l; int x_ori; int count = 0; cin >> x >> y >> l; if (x == 0 || y == 0) { x = abs(x); y = abs(y); count += (x + y) / l; if ((x + y) % l != 0)count++; }else{ if (x < 0) count++; if (y < 0) count++; x = abs(x); y = abs(y); count += (x / l); if (x%l != 0)count++; count++; count += (y / l); if (y%l != 0)count++; } cout << count << "\n"; }