Greg had $17 more than Fred, and together they had just enough money to by their mom a present that costs $85. How much money did Greg have?