In triangle PQR length of the side QR is less than twice the length of the side PQ by 2 cm. Length of the side PR exceeds the length of the side PQ by 10 cm. The perimeter is 40 cm. the length of the smallest side of the triangle PQR is: