def push_number(i: int, sailfish_number: tuple) -> tuple:
    """
    Add the number i to the first integer encounterd in nested tuples. A negative i is pushed from the tail end.
    :param i: The number to add
    :param sailfish_number: The sailfish number to add i to
    :return: The new sailfish number

    >>> push_number(1, (1,2))
    (2, 2)

    >>> push_number(-1, (1,2))
    (1, 3)

    >>> push_number(1, ((1,2), 3))
    ((2, 2), 3)
    """
    if i < 0:
        if type(sailfish_number[1]) is tuple:
            return sailfish_number[0], push_number(i, sailfish_number[1])
        else:
            return sailfish_number[0], sailfish_number[1] - i
    else:
        if type(sailfish_number[0]) is tuple:
            return push_number(i, sailfish_number[0]), sailfish_number[1]
        else:
            return sailfish_number[0] + i, sailfish_number[1]