Jill picks a number at random and multiplies it by 2 and adds five to the product. She then multiplies the sum by -3 and subtracts 7 from the product. After these four steps her new number is -40. What was her original number?