#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) int X,Y,L; signed main() { cin>>X>>Y>>L; int cnt = 0; if (Y > 0) { cnt += (Y+L-1)/L; } else if (Y < 0) { Y *= -1; cnt += (Y+L-1)/L + 1; if (X == 0) cnt++; } if (X != 0) { cnt += (abs(X)+L-1)/L + 1; } cout << cnt << endl; return 0; }