Roberts piggy bank contained toonies, loonies and quarters in the ratio 2:3:4. There were 81 coins in the piggy bank. How many loonies were in the piggy bank?

Thank you for the help

2x+3x+4x = 81

x = 9
so loonies = 3x = 27