How much candy can you eat?
Python 3, 76 bytes



F=lambda x:x&lt;2or x*F(x-1)
f=lambda x,n=1:x&lt;2or n*(F(x)&gt;F(x-n)**2)or f(x,n+1)


Try it online!

Relies on the fact that for eating \$n\$ candies to still win and the total number of candies being \$x\$, \$\frac{x!}{(x-n)!}&gt;(x-n)!\$ must be true, which means \$x!&gt;((x-n)!)^2\$.

-1 from Skidsdev

-3 -6 from BMO

-3 from Sparr

+6 to fix x = 1