import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); int N = sc.nextInt(); long mod = 1000003; long sum=0; for(int i=0; i