#include #include using namespace std; #define rep(i,n) for(int i = 0; i < (n); i++) int main(){ int x = 0; cin >> x; int y = 0; cin >> y; int l = 0; cin >> l; int mo = 0; int res = 0; if(y<0){ mo = y/l; res=y%l; if(res!=0){ mo+=1; }} else if(y>0){ y = abs(y); mo+=1; mo+=y/l; res=y%l; if(res!=0){ mo+=1; }} if(x<0){ mo+=1; mo+=x/l; res=y%l; if(res!=0){ mo+=1; }} else if(x>0){ x = abs(x); mo+=1; mo+=x/l; res=y%l; if(res!=0){ mo+=1; }} cout << mo << endl; return 0; }