#include int main(){ int X,Y,L,i,j,ans=0; scanf("%d%d%d",&X,&Y,&L); if(X<0) X=-X; if(Y<0) Y=-Y; if(X%L==0) ans=ans+X/L; else ans=ans+X/L+1; if(Y%L==0) ans=ans+Y/L; else ans=ans+Y/L+1; if(X!=0) ans++; /* if(Y!=0) ans++; */ printf("%d\n",ans); return 0; }