package main import ( "fmt" "math" ) func resolve(X, Y, L int) int { ret := 0 flg := 0 dx := int(math.Ceil(math.Abs(float64(X)) / float64(L))) dy := int(math.Ceil(math.Abs(float64(Y)) / float64(L))) if Y > 0 { ret += dy } if X != 0 { ret += 1 + dx flg = 1 } if Y < 0 { ret += 2 + dy - flg } return ret } func main() { var X, Y, L int fmt.Scanf("%d\n%d\n%d\n", &X, &Y, &L) fmt.Println(resolve(X, Y, L)) }