def triple_step_iterative(nb_of_steps):
    """
    The most naive implementation, using 3 variables corresponding
    to the 3 previous states, we calculate the next and update them
    continuously until we've looped up to nb_of_steps.
    """
    a, b, c = 0, 0, 1
    for step in range(nb_of_steps):
        temp_var = a + b + c
        a = b
        b = c
        c = temp_var
    return c