once Vasya need transport m goat m wolf riverbank quickly possible the boat hold n animal Vasya addition permit n animal boat if place bank boat wolf happen strictly outnumber goat wolf eat goat Vasya get upset when Vasya swim boat shore animal accompany bored feel upset when boat reach bank animal simultaneously animal choose Vasya simultaneously boat that mean moment animal arrive get animal go leave have not get somebody eat Vasya need transport animal river bank eat Vasya do not upset what minimal number times cross river