def u(n):
    v = 7
    k = 0
    while k < n:
        v = 0.5 * v + 2
        k = k + 1

    return v
