Three times a number decreased by six is 40.