#include #include #include #include #include using namespace std; int main(void){ int x, y, l; cin >> x >> y >> l; long long ans = 0; if(y < 0) ans++, y = -y; if(x < 0) x = -x; if(x != 0) ans++; ans += x / l + (x % l == 0 ? 0 : 1); ans += y / l + (y % l == 0 ? 0 : 1); cout << ans << endl; return 0; }