Fangy collects COOKIEs. Once he decided to take a box and put COOKIEs into it in some way. If we take a square k × k in size, divided into blocks 1 × 1 in size and paint there the main diagonal together with cells, which lie above it, then the painted area will be equal to the area occupied by one COOKIE k in size. Fangy also has a box with a square base 2n × 2n, divided into blocks 1 × 1in size. In a box the COOKIEs should not overlap, and they should not be turned over or rotated. See COOKIEs of sizes 2 and 4respectively on the figure:
To stack the COOKIEs the little walrus uses the following algorithm. He takes out of the repository the largest COOKIE which can fit in some place in the box and puts it there. Everything could be perfect but alas, in the repository the little walrus has infinitely many COOKIEs of size 2 and larger, and there are no COOKIEs of size 1, therefore, empty cells will remain in the box. Fangy wants to know how many empty cells will be left in the end.
The first line contains a single integer n (0 ≤ n ≤ 1000).
Print the single number, equal to the number of empty cells in the box. The answer should be printed modulo 106 + 3.
3
9
If the box possesses the base of 23 × 23 (as in the example), then the COOKIEs will be put there in the following manner: