Terry had some nails. He used $$\frac{5}{6}$$ of them to make a cupboard and $$\frac{1}{4}$$ of the remaining nails to make a shoe-rack. He had 36 nails left. <hr> He had <input min="0" type="number" id="imp5pg057q9b_1" class="lineinput" placeholder="?"> nails at first.