The numbers 3,5,7 and 9 have their respective frequencies x−2,x+2,x−3 and x+3. If the arithmetic mean is 6.5, then the value of x is