CF889E Mod Mod Mod

Description

You are given a sequence of integers $ a_{1},a_{2},...,a_{n} $ . Let ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF889E/babd3332060a4ee6973a9fa3f688c744930d9a0a.png), and ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF889E/3a61ca4726dc1db34df92b20859e100704661de5.png) for $ 1

Input Format

The first line contains a single integer $ n $ ( $ 1

Output Format

Output a single integer — the maximum value of $ f(x,1) $ over all nonnegative integers $ x $ .

Explanation/Hint

In the first example you can choose, for example, $ x=19 $ . In the second example you can choose, for example, $ x=3 $ or $ x=2 $ .