Problem2173--Dislike of Threes (CF1560A)

2173: Dislike of Threes (CF1560A)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Sample Input Copy

10
1
2
3
4
5
6
7
8
9
1000

Sample Output Copy

1
2
4
5
7
8
10
11
14
1666

Source/Category