def main(): n = int(input()) print(1 - 6*(5/6)**n + 15*(4/6)**n - 20 * (3/6)**n + 15*(2/6)**n - 6*(1/6)**n) if __name__ == '__main__': main()