21
Pyth, 19 18 bytes
-1 byte by @FryAmTheEggman
I claim that the number of pies that can be formed from an ascending list [x1,x2,x3,x4,x5] is:
floor(min((x1+x2+x3+x4+x5)/3,(x1+x2+x3+x4)/2,x1+x2+x3))
Or in code:
hS[/sJSQ3/sPJ2sPPJ
[See revision history for TI-BASIC and APL programs]
Proof of...