def brouncker(n):
    aire = 0.5 # aire du premier rectangle
    for k in range(1,n):
        base = 1 / 2**k
        X = [ 1 ]
        x = 1
        while x < 2:
            x = x + base
            X.append( x )

        for i in range( 1 , len(X) , 2):
            aire = aire + base * ( 1/X[i] - 1/X[i+1] )

    return aire
