package main import "fmt" func main(){ var A,B,N,M int64 fmt.Scan(&A,&B,&N,&M) if A>B{ fmt.Println(B+(A-B)/(N+1)) }else{ fmt.Println(A+(B-A)/(M+1)) } }