#include int main(void) { long x, y, l, step = 0, i; scanf("%ld%ld%ld", &x, &y, &l); // 回転 if(y < 0){ step++; if(x == 0) step++; } if(x) step++; // printf("%ld\n", step); // 前進 if(x < 0) x -= (x << 1); for(i = 0; i < x; step++) i += l; if(y < 0) y -= (y << 1); for(i = 0; i < y; step++) i += l; // printf("y = %ld\n", y); // printf("x = %ld\n", x); printf("%ld\n", step); }