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