A three-digit number ends in number 7. If you put the number 7 in the first position, the number will increase by 324. Find the original three-digit number.