lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end n, m, x, y, z = read_line.split.map(&.to_i) a = read_line.split.map(&.to_i) if a.count { |i| i >= x } > m puts "Handicapped" exit end sum = a.sum dp = Array.new(-~n) { [0i64] * -~sum } dp[0][0] = 1i64 a.each do |val| dp2 = Array.new(-~n) { [0i64] * -~sum } (0...n).reverse_each { |i| (0...sum).reverse_each { |j| dp2[i + 1][j + val] += dp[i][j] if val > y && dp[i][j] > 0 dp2[i][j] += dp[i][j] if val < x && dp[i][j] > 0 } } dp = dp2.dup end ans = 0i64 (0..n).each { |i| (0..sum).each { |j| ans += dp[i][j] if i * z == j && i <= m && i != 0 } } puts ans