def part2(input_lines):
    """
    Okay. Can't store the buffer any more. 50,000,000 iterations time.
    
    Thankfully, we don't need to. What we need to do is keep track of
    the current position, and of the thing in position 1 (the thing after)
    zero.
    """
    step_size = int(input_lines[0])
    pos = 0
    val = 0
    for i in range(50000000):
        pos = (pos + step_size) % (i + 1) + 1
        if pos == 1:
            val = i + 1
    return val