$/=get.words;say -$1*+^-$0+words.sum