package main import "fmt" func main() { var px, py, qx, qy int fmt.Scan(&px, &py, &qx, &qy) x_diff := abs(px - qx) y_diff := abs(py - qy) t2 := x_diff + y_diff t := t2/2 + t2%2 fmt.Println(t) } func abs(a int) int { if a < 0 { return a * -1 } return a }