#include int main(){ long int X,Y,L,i=0,j=0,ans=0,flag=0; scanf("%ld%ld%ld",&X,&Y,&L); if(X<0){ X=-X; i++; } if(Y<0){ Y=-Y; j++; } 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){ if(j==0) ans++; } if(j!=0) ans+=2; printf("%ld\n",ans); return 0; }