// No.2691 Longest Infection Sequence package main import "fmt" func main() { var a, b, o, w int fmt.Scan(&a, &b, &o, &w) ans := o + w if max(a, b) > 0 { ans += max(a, b) } fmt.Println(ans) }