Let me start you off.

Assume that the smallest and greatest elements of X are 1 and n respectively. The number of such sets is . (How?) f(X) = 1.

Assume that the smallest and greatest elements of X are 1 and n-1 respectively. The number of such sets is . f(X) = 1/2.

etc.