Each exterior angle of a regular polygon is 40∘40^\circ40∘. Calculate the number of sides the polygon has.