The sides of a right angled triangle are 2a cm, (2a+2) cm and (4a -2) cm. What is the length of the shortest side of the triangle if its perimeter is 24 cm?