#P1405. Modular Height

    ID: 14691 Type: Default 1000ms 256MiB

Modular Height

Modular Height

Huang Xiaoming and his partner wish to establish an English training institute. When registering, they must fill out a personal information form. However, in the height field, Xiaoming faces a dilemma. His height is measured in centimeters and must be recorded exactly. Unfortunately, Xiaoming is so tall that his full height cannot be fully written on the paper.

To bypass this problem, Xiaoming bribed an official so that he only needs to write his height modulo \(10007\) on the form. Xiaoming, not knowing how to compute the modulo operation, has come to ask for your help. Given his height (which may be a very large number), compute his height modulo \(10007\).

inputFormat

The input consists of a single non-negative integer representing the height in centimeters. The number may be very large (i.e. it might not fit in standard integer types), so you should process it as a string.

outputFormat

Output a single integer which is the remainder when the given height is divided by \(10007\).

sample

170000
9888