use text_io::*;

fn main(){
  let n:usize = read!();
  let k:usize = read!();
  let mut a = Vec::new();
  for _ in 0..n{
    let ai:usize = read!();
    a.push(ai);
  }
  let mod = 1000000007;
  
  let mut dp = vec![vec![0;k+10];n+10];
  let mut dpc = Vec::new();
 
  dp[0][0]=1;
  for i in 1..=n{
    for j in 0..=k{
      dp[i][j] = dp[i-1][j] - dp[i-1].get(j-a[i-1]-1).unwrap_or(0);
    }
}
  
  