Mrs. Regan went shopping and purchased 37 trees for the yard. ​Mr. Regan also went shopping and bought some trees. ​ ​If they had a total of 82 trees, how many did Mr. Regan buy?