it v n N to-inf
This pattern is also used to indicate the amount of money or time needed to do something. Any noun group referring to an amount of money or a period of time can be used after the verb (cost or take).
It cost us two million pounds to buy that site.
It took me a long time to get better.