n=int(input()) a=list(map(int,input().split())) dp=[0]*10001 dp[5000]=1 mod=10**9+7 for i in a: j=i-50 dp2=dp.copy() for k in range(0,10001): if 0<=j+k<=10000: dp[k+j]+=dp2[k] dp[k+j]%=mod print(sum(dp[5001:])%mod)