#K105. 乘着列车,出发喽! (Train to the Paradise)

乘着列车,出发喽! (Train to the Paradise)

Warning: This question strictly requires the use of C/C++ language for answering, and Python is prohibited from use. The numbers and output results that appear during the calculation process of this question may not be represented by long long int or unsigned long int because they can be too large, but it can be guaranteed that all results can be represented as an integer of no more than 20002000 decimal bits.

Background

Mr. Sha from ShanghaiTech University felt that his life was too boring, so he established a paradise in an unknown place in the universe and built a track connecting the university and the paradise. On the track, there was a commuter train from the university to the paradise. After multiple track repairs, trains departed from the university one after another, carrying classmates who thought similarly to Mr. Sha, heading towards the paradise filled with eternal hope and happiness.

The 11st train departs in the 00th minute. 22 minutes later, the 22nd train departed. Another 55 minutes passed, and the 33rd train departed. After another 77 minutes, the 44th train departed. Starting from the 44th train, the interval between the nn-th train and the (n1)(n-1)-th train is the same as the interval between the (n1)(n-1)-th train and the (n3)(n-3)-th train. Mr. Sha wants to know the departure time of the kk-th train to ensure that he can arrive at the station on time for boarding.

Description

Input a positive integer kk, output the interval between the kk-th train and the 11st train.

Format

Input

A positive integer kk.

Output

Another positive integer tt, satisfying that the interval between the kk-th train and the 11st train is tt minutes.

Samples

5
26

The 55th train departs at the 2626th minutes after the 11st train departs, because 0+2+5+7+12=260+2+5+7+12=26.

Limitation

1s, 1024KiB for each test case.