package main import "fmt" func min(x, y int) int { if x < y { return x } return y } func main() { var A, B int fmt.Scan(&A, &B) ans := 1 for { t := (ans << 1) + 1 if t > A || t > B { break } ans = t } fmt.Println(ans) }