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