23 oranges.
Explanation:
40 -
17
-----------------
you start by removing 7 from 0, but that's not possible so you borrow from the 4 in 40. add 10 in replacement to 0, and make the 4 into a 3. now, subtract 7 from 10. that would get you to 3. after you do that, remove 1 from 3. that would be 2. after you do all of that, you get 23!
extra points-
he would be a cannibal. yet another reason to throw him behind bars. :D
hope this helps!