Six identical coins are arranged in a row. The number of ways in which the number of tails is equal to the number of heads is?

A 20
B 9
C 120
D 40