Let Sn=\e1+...+\en, where \ei are i.i.d. Bernoulli r.v.'s. Let 0≤rd(n)<2d be the least residue of n mod(2d), rˉd(n)=2d−rd(n) and \b(n,d)=max(d1,n1)[e−rd(n)2/2n+e−rˉd(n)2/2n]. We show that 2≤d≤nsup¶{d∣Sn}−E(n,d)=O(n3/2log5/2n), where E(n,d) verifies c1\b(n,d)≤E(n,d)≤c2\b(n,d) and c1,c2 are numerical constants.