def depasse_puis3(N): k = 0 while 3**k <= N: k = k+1 return k