#include #include int main(void){ int cnt = 0, X, Y, L; scanf("%d %d %d", &X, &Y, &L); if(Y>0){ if(Y%L==0){ cnt += Y/L; }else{ cnt += Y/L + 1; } if(X!=0){ cnt++; if(abs(X)%L==0){ cnt += abs(X)/L; }else{ cnt += abs(X)/L + 1; } } }else if(Y==0){ if(X!=0){ cnt++; if(abs(X)%L==0){ cnt += abs(X)/L; }else{ cnt += abs(X)/L + 1; } } }else{ cnt += 2; if(abs(Y)%L==0){ cnt += abs(Y)/L; }else{ cnt += abs(Y)/L + 1; } if(X!=0){ if(abs(X)%L==0){ cnt += abs(X)/L; }else{ cnt += abs(X)/L + 1; } } } printf("%d\n", cnt); return 0; }