Finding value of X by formula