def main(f, n): return prevFarey(f, n)[0]
def main(left, right, n): count = -1 while left != right: right = prevFarey(right, n) count += 1 return count