package main import ( "fmt" "math" ) func main() { var x, y, x1, y1 float64 fmt.Scan(&x, &y, &x1, &y1) var ans float64 if math.Abs(x1-x) == math.Abs(y1-y) && x > x1 && y > y1 { ans += 1 } ans += max(math.Abs(x), math.Abs(y)) fmt.Println(ans) } func max(a, b float64) float64 { if a > b { return a } else { return b } }