Five sheep and three locks