#t286. 找最大值

找最大值

Maximum Sum

Problem Background

Special for beginners, ^_^

Problem Description

There are three integers a1,a2,a3a_1, a_2, a_3. It is known that 0≤a1,a2,a3≤n0 \le a_1, a_2, a_3 \le n, and a1+a2a_1 + a_2 is a multiple of 22, a2+a3a_2 + a_3 is a multiple of 33, and a1+a2+a3a_1 + a_2 + a_3 is a multiple of 55.

Your task is to find a set of a1,a2,a3a_1, a_2, a_3 such that a1+a2+a3a_1 + a_2 + a_3 is maximized.

Input Format

One line containing an integer n (0≤n≤100)n\ (0 \le n \le 100).

Output Format

One integer, the maximum value of a1+a2+a3a_1 + a_2 + a_3.

Sample Input

3

Sample Output

5

Constraints

1s, 1024KiB for each test case.