import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); try { String[] temp1 = stdReader.readLine().split(" "); int x = Integer.parseInt(temp1[0]); int N = Integer.parseInt(temp1[1]); String[] temp2 = stdReader.readLine().split(" "); int ans = 0; for(int i=0;i0){ if(n%2==0){ temp = temp*temp % 1000003; n /= 2; }else{ n -= 1; ans = ans *temp % 1000003; } } return (int)ans; } }