adding cost of dancing problem