Ali and Baba discovered an underground palace and set out to map all the treasure in it. After carefully mapping the interior, they found that the palace had a vault filled with treasure chests. In each chest, they found either 7 gold bars or 11 silver bars. There were 90 bars in total. How many of them were gold bars?