#include using namespace std; #define REP(i,N) for(i=0;i P; typedef struct{ int first; int second; int third; }T; //昇順 bool comp_Se(T& l, T& r){ return l.second < r.second; } int main(void){ ll x,y,L; int ans=0; cin >> x >> y >> L; if(y<0)ans+=2; else if(abs(x)>0) ans++; if(abs(x)%L==0) ans+=(abs(x)+L)/L; else ans+=abs(x)/L; if(abs(y)%L==0) ans+=(abs(y)+L)/L; else ans+=abs(y)/L; return 0; }