import java.math.BigInteger;

public class Euler97 {
    public static void main(String[] args) {
        BigInteger mod = BigInteger.TEN.pow(10);
        BigInteger result = BigInteger.valueOf(28433).multiply(BigInteger.TWO.modPow(BigInteger.valueOf(7830457), mod))
                .add(BigInteger.ONE).mod(mod);
        System.out.println(result);
    }
}
