#include #define int long long #define double long double using namespace std; const int MOD = 1000000007; const int INF = 1e14; using Graph = vector>; signed main(){ int X, Y, L; cin >> X >> Y >> L; int ans = (abs(X)+L-1)/L + (abs(Y)+L-1)/L; if( X != 0 ) ans++; if( Y < 0 ) ans++; cout << ans << endl; }