One wild cart ride later they stood blinking in the sunlight outside Gringotts. Harry didn't know where to run first now that he had a bag full of money. He didn't have to know how many Galleons there were to a pound to know that he was holding more money than he'd had in his whole life -- more money than even Dudley had ever had.
I don't know how to parse the sentence correctly. The first "to know" is easy for me to understand. The second "to know" got me lost. Can someone help to identify what the second "to know" does there?
P.S. The passage is from the book Harry Potter.