gets.tr!'*+','+*' r=/^\d+[+*]\d+/ $_[r]=(eval$&).to_s while~r puts$_