A drive shaft of 40 mm diameter transmitting 25 kW at 300 rpm is connected to a gear by a flat key of width 22 mm and thickness 14 mm. It is made of steel having 300 MPa yield stress. Determine the length of the key to withstand shear. Use a factor of safety 2.