main = do e<-getLine let n=read e::Int ans=concat $ replicate n "142857" putStrLn $ if n==0 then "0" else "0."++(take n ans)