Mary owned n sheep and Sam had exactly 4 times as many sheep as Mary. Mary buys 17 extra sheep and Sam sells 8 of his sheep. Sam still has more sheep than Mary. Form an inequality, in terms of n. Solve the inequality to find the least value of n.