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