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