A man bought some eggs. While he was walking home, he broke $$\frac{1}{6}$$ of them and threw them away. He gave 18 of the remaining eggs to his neighbours and was left with $$\frac{1}{2}$$ of the eggs that he bought. <hr> How many eggs did he buy? <br> <input min="0" type="number" id ="imp6pg067q11_1" class="lineinput" placeholder="?" />