We will prove that the minimum number m of cookies is 2n. Let us write A−n+1,…,A0(=A),A1,A2,…,An−1,An to denote the 2n people in the counterclockwise order.
First let us show that if m<2n, then there is a way to distribute m cookies so that A cannot get a cookie. Let ai be the amount of cookies given to Ai. Let N=∑i=−n+1nai2∣i∣. Note that the value of N is non-increasing when one passes a cookie to the neighbors. So let us initially give all m cookies to An. Then N=m2−n<1. This means that even if we allow the people to pass cookies under the given rules, we still have N<1 and therefore it is impossible for A to have a cookie.
Now let us show that if m=2n, then there is a strategy to make A have a cookie. Let ai be the amount of cookies given to Ai. By symmetry, we may assume that ∑i=0n−1ai≥∑i=0n−1a−i.
We ask An to pass ⌊an/2⌋ cookies to An−1 by eating ⌊an/2⌋ cookies by himself. This allows us to assume that A0,A1,A2,…,An−1 have at least m/2=2n−1 cookies. (If an is even, then this is O.K. because they will have at least (m−an)/2+an/2 cookies. If an was odd, then they will have at least (m−an)/2+(an−1)/2=m/2−1/2 cookies. Since m is even, we can still conclude that A0,A1,A2,…,An−1 have at least m/2 cookies.)
Now we claim that for k=1,2,…,n−1, if A0,A1,A2,…,Ak have at least 2k cookies, then by passing cookies of Ak to Ak−1, we may assume that A0,A1,A2,…,Ak−1 have at least 2k−1 cookies. We may assume that ak>2k−1. If ak=2k, then we simply let Ak pass 2k−1 cookies to Ak−1 by eating 2k−1 cookies. So we may assume ak<2k−1+2k−1. Therefore there exists an integer i∈{1,2,3,…,k−1} such that
2k−1+2k−2+⋯+2k−i<ak≤2k−1+2k−2+⋯+2k−i−1.
Note that
i=0∑k−1ai≥2k−ak≥2k−(2k−1−2k−2+⋯+2k−i−1).
Now if Ak passes his cookies to Ak−1 as many as he can, then he can pass at least 2k−2+2k−3+⋯+2k−i−1 cookies.
Then A0,A1,…,Ak−1 have at least ∑i=0k−1ai+(2k−2+⋯+2k−i−1)≥2k−1 cookies. This proves the claim.
By the above claim we can inductively make A0 have at least 20=1 cookies. □