def get_width_at_d(lst, d: int) -> int:
    """
    >>> get_width_at_d([1, 2], 1)
    2
    >>> get_width_at_d([[1, 2, 3], [2,4]], 2)
    5
    """
    if d == 0 or isinstance(lst, int):
        return 0
    elif d == 1:
        return len(lst)
    else:
        count = 0
        for sublist in lst:
            count += get_width_at_d(sublist, d-1)
        return count