A baker bought some butter. He used 360 grams to make some pastry. This was 5/6 of the butter he had. How much butter did he buy at first?