#include int walk(int to,int l){ if(to%l==0){ return to/l; }else{ return to/l+1; } } int main(){ int x; int y; int l; scanf("%d%d%d",&x,&y,&l); int step=0; if(y>0){ step+=walk(y,l); if(x>0){ step++; step+=walk(x,l); }else if(x<0){ step++; step+=walk(-x,l); } }else if(y<0){ step++; if(x>0){ step+=walk(x,l); }else if(x<0){ step+=walk(-x,l); } step++; step+=walk(-y,l); }else{ step++; if(x>0){ step+=walk(x,l); }else if(x<0){ step+=walk(-x,l); } } printf("%d",step); }