A man paved his square courtyard with square tiles. After this, he wanted to increase the size of his courtyard and bought 324 more tiles of the same size. These were added onto the existing courtyard to make a bigger one in square shape. Find the total number of tiles used to make the bigger courtyard.