from math import *

def Distance (xA,yA,xB,yB):
    y=sqrt(...)
    return y

def Longueur(N):
    S=0
    u=0
    for i in range(N):
        v=...
        S=S+Distance(...,...,...,...)
        u=v
    return S

