def find_value_after_0(steps, target):
    """Find value after 0 when target is inserted, with number steps each."""
    position = 0
    cur_value = 0
    for number in range(1, target + 1):
        position = (position + steps + 1) % number
        if position == 0:
            cur_value = number
    return cur_value