def demi_vie(N,p): n=N i=0 while n>N/2: i+=1 n=compte_noyaux_restants(n,p) return i