canonic n = tail . map snd $ scanl (\(x,d) y -> if x>=y then (x-y,1) else (x,0)) (n,0) (reverse $ takeWhile (<= n) (tail fibs))
canonic n = tail . map snd $ scanl (\(x,d) y -> if x>=y then (x-y,1) else (x,0)) (n,0) (reverse $ takeWhile (<= n) (tail fibs))