def u(n):
    v = 7
    for k in range(1,n+1):
        v = 0.5*v + 2

    return v
