#CCBCHBAHAI0000059. Grading Students (Grading Students)

Grading Students (Grading Students)

Grading Students (Grading Students)

Source: HackerRank

Version: Phuoc Hung OJ Extended

Problem

For each grade gg, 0≤g≤1000\le g\le100, grades below 3838 are never rounded. For g≥38g\ge38, let

m=5⌈g5⌉m=5\left\lceil\frac{g}{5}\right\rceil

be the smallest multiple of 55 not below gg. If m−g<3m-g<3, replace gg by mm; otherwise keep gg unchanged. Apply the rule independently to all grades.

Input

The first line contains nn. Each of the next nn lines contains one grade gig_i.

Output

Print the rounded grades, one per line.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10.

Subtask 2 (30 points): 1≤n≤301\le n\le30.

Subtask 3 (50 points): 1≤n≤601\le n\le60, 0≤gi≤1000\le g_i\le100.

Example

Input

4
73
67
38
33

Output

75
67
40
33

Explanation

The sample follows the definitions and rules above.