In reply to Subrata.

Personally, I wouldn't call this a cluster problem. It is simply an arithmetic mean. Let N1=number of males and N2=number of females. Then the mean of the coding vector is (N1*1 + N2*0)/(N1+N2). Set this equal to 2/3 and solve algebraically for N1.