import java.util.Scanner; public class Main{ static long mod=1000003; static long pow(long a,long x,long m){ if(x==0) return 1; else if(x%2==0) return pow((a*a)%m,x/2,m)%m; else return (a*pow((a*a)%m,x/2,m))%m; } public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ long x=sc.nextLong(); int n=sc.nextInt(); long ans=0; for(int i=0;i