#include using namespace std; typedef long long ll; typedef pair pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); int x,y,l;cin >> x >> y >> l; x=abs(x); if(y<0){ cout << (x+l-1)/l+(y+l-1)/l+2 << endl; } else{ if(x==0) cout << (y+l-1)/l; else cout << (y+l-1)/l+(x+l-1)/l+1 << endl; } }