func buyChoco(prices []int, money int) int { first := 100 second := 100 for _, price := range prices { if first > price { second = first first = price } else if second > price { second = price } } if first + second > money { return money } return money - first - second }