If median of the following frequency distribution is 35 then find the value of x.

Class interval 0-10 10-20 20-30 30-40 40-50 50-60 60-70
Frequency 2 3 x 6 5 3 2