#include #include int main(){ long long int EW, NS; long long int dt, cnt = 0; scanf("%lld %lld %lld", &EW, &NS, &dt); if(NS >= 0 && EW != 0){ cnt++; }else if(NS < 0){ cnt += 2; }else if(NS == 0 && EW == 0){ ; } if(NS%dt == 0){ cnt += llabs(NS)/dt; }else{ cnt += llabs(NS)/dt + 1; } //if(EW != 0) cnt++; if(EW%dt == 0){ cnt += llabs(EW)/dt; }else{ cnt += llabs(EW)/dt + 1; } printf("%lld\n", cnt); return 0; }