def utopianTree(n):
    # Write your code here
    init_height = 1
    
    for i in range(n):
        if (i + 1) % 2:
            init_height *= 2
        else:
            init_height += 1
            
    return init_height