Yucai Primary School held an art exhibition for primary school students, 18 of which were not in the sixth grade, and 22 were not in the fifth grade. It is known that the fifth and sixth grades exhibited a total of 24 paintings. How many paintings were exhibited in total by other grades?
育才小学举行小学生画展，其中18幅不是六年级的，22幅不是五年级的．已知五六年级共展出24幅画．其他年级共展出多少幅画？
<result>3</result>