Your friend tosses three coins and you roll a single die. If the number on the die you roll is less than or equal to the number of heads that your friend tosses, you win $X. If not, you lose $1. How large should X be in order for this to be a fair game?

see above