#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 ) { count++; x_ori = abs(x); } else { x_ori = x; } count += (x_ori / l); if (x_ori%l != 0) count++; //cout << count << "\n"; if (y < 0) { if (x >= 0) { count += 2; } else { count++; } y = abs(y); } count += (y / l); if (y%l != 0) count++; cout << count << endl; return 0; }