import std.stdio, std.format, std.conv, std.string, std.algorithm;

void main()
{
  string input = readln;
  int n, w;
  formattedRead( input, "%d %d\n", &n, &w );
  ulong[] weight = new ulong[]( n );
  foreach ( i; 0 .. n ) {
	weight[ i ] = to!ulong( strip( readln ) );
  }
  sort( weight );
  ulong[] dpBef = new ulong[]( w + 1 );
  ulong[] dpAft = new ulong[]( w + 1 );
  dpBef[] = 0;
  dpBef[ 0 ] = 1;
  dpAft[] = 0;
  foreach ( i; weight ) {
	foreach ( j; 0 .. w + 1 - i ) {
	  dpAft[ i + j ] += dpBef[ j ];
	  dpAft[ i + j ] %= 1_000_000_007UL;
	  dpAft[ j ] += dpBef[ j ];
	  dpAft[ j ] %= 1_000_000_007UL;
	}
	dpBef[] = dpAft[];
	dpAft[] = 0;
  }
  writeln( reduce!"a + b"( 0UL, dpBef ) % 1_000_000_007UL );
}