A small bag of 10 identical apples weighs n ounces, and a large bag of n of these apples weighs less than 40 ounces, where n is an integer. In ounces, what is the greatest possible weight of the large bag? Express your answer as a mixed number.