import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String num = sc.next();
long temp = 0;
for(int i = 0; i < num.length(); i++) {
temp = (temp * 10 + (num.charAt(i) - '0')) % 20000303;
}
System.out.println(temp);
sc.close();
}
}
BigInteger를 사용하려고 했으나, 백준 채점 결과 시간 초과라는 메시지가 떴다.
String으로 입력 받은 num을 숫자로 변형 받아서 이를 20000303으로 나누어 답을 도출하였다.