During migration, a gray whale swam 5,040 miles, The whale swam a total of 672 miles during its first 7 days of migration. If the wliale swam at the same rate during the entire migration, how many miles did it swim during the first 30 days of migration?