The figure below has a perimeter of 31 millimeters. Find the value of x.


_____