AlgoUniversity
  • Go Back
Discussion
Special Keyboard :

Author

Ujjwal Srivastava

Difficulty Level : Medium

Submissions : 623

Asked In : Zomato

Marks :30

: 12 | : 0

Imagine you have a special keyboard with the following keys:

Key 1: Prints $$$A$$$ on screen

Key 2: $$$(Ctrl-A)$$$: Select screen

Key 3: $$$(Ctrl-C)$$$: Copy selection to buffer

Key 4: $$$(Ctrl-V)$$$: Print buffer on screen appending it after what has already been printed.

Find the maximum numbers of $$$A's$$$ that can be produced by pressing keys on the special keyboard $$$N$$$ times.

Input

The first line contains a single integer $$$N$$$.$$$(2\le N \le75).$$$

Output

Your task is to return the maximum number of $$$A's$$$ that can be on the screen after performing $$$N$$$ operations.

Examples

Input
7
Output
9
Input
2
Output
2

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.