#include #include #include using namespace std; int main(){ int x, y, l; cin>> x>> y>> l; int cnt = 0; if(y<0){ cnt+=2; }else if(x!=0){ cnt++; } if(x<0) x = -x; cnt += ceil((double)x/l); if(y<0) y = -y; cnt += ceil((double)y/l); cout<< cnt<< endl; return 0; }