There are 1,024 megabytes in one gigabyte.
This comes from the way computers count in binary, where each step up is 1,024 times the previous unit rather than a round 1,000.