def no_of_subsequences(arr, k):
    if k <= 1:
        return 0

    n = len(arr)
    if n == 0:
        return 0

    zeros = arr.count(0)
    non_zero = [x for x in arr if x != 0]

    total = 0

    if zeros:
        total += (1 << n) - (1 << (n - zeros))

    if not non_zero:
        return total

    non_zero.sort()
    m = len(non_zero)

    dp = [0] * k
    for x in non_zero:
        if x >= k:
            continue
        new_dp = dp[:]
        new_dp[x] += 1
        limit = (k - 1) // x
        for p in range(1, limit + 1):
            c = dp[p]
            if c:
                new_dp[p * x] += c
        dp = new_dp

    total += sum(dp)
    return total