Processing math: 100%
Beautiful number - MarisaOJ: Marisa Online Judge

Beautiful number

Time limit: 1000 ms
Memory limit: 256 MB

A positive integer is considered beautiful if it is divisible by 3, 5, or 7.

If we arrange beautiful numbers in ascending order: 3,5,6,7,9,10,12,…, what is the k-th beautiful number?

Input

  • A single line containing an integer k.

Output

  • Print the k-th beautiful number.

Constraints

  • 1≤k≤109.

Example

Input:

9

Output:

15