m,*a=`dd`.split.map &:to_i;x=m-a.reduce(:+)+1;y=a.size;M=10**9+7;I=[1,1];*F=I;*R=I 2.upto(m){|i|I<<(M-M/i)*I[M%i]%M;F<