#include using namespace std; using LL=long long; int main() { LL X, Y, L; cin >> X >> Y >> L; cout << ( abs( X ) + L - 1 ) / L + ( abs ( Y ) + L - 1 ) / L + ( Y < 0 && X != 0 ? 2 : X != 0 ? 1 : 0 ) << endl; return 0; }