A certain number of friends are waiting in line to board a new rollercoaster they can board the ride in 5040 different ways. How many friends are in line?