#include using namespace std; int main(){ int x,y,n,c=0; cin>>x>>y>>n; x=abs(x); if(y>0){ c+=(y-1)/n+1; if(x!=0){ c++; c+=(x-1)/n+1; } }else{ if(x!=0){ c++; c+=(x-1)/n+1; } if(y!=0){ c++; c+=(-y-1)/n+1; } } cout<