def pacs(M): a=0.07; b=1.54 x=6 y=a*x+b while y <= M: x=x+1 y=a*x+b return(x)