Problem: In Pavlopolis University where Noora studies it was decided to hold beauty contest "Miss Pavlopolis University". Let's describe the process of choosing the most beautiful girl in the university in more detail.

The contest is held in several stages. Suppose that exactly n girls participate in the competition initially. All the participants are divided into equal groups, x participants in each group. Furthermore the number x is chosen arbitrarily, i. e. on every stage number x can be different. Within each group the jury of the contest compares beauty of the girls in the format "each with each". In this way, if group consists of x girls, then <image> comparisons occur. Then, from each group, the most beautiful participant is selected. Selected girls enter the next stage of the competition. Thus if n girls were divided into groups, x participants in each group, then exactly <image> participants will enter the next stage. The contest continues until there is exactly one girl left who will be "Miss Pavlopolis University"

But for the jury this contest is a very tedious task. They would like to divide the girls into groups in each stage so that the total number of pairwise comparisons of the girls is as few as possible. Let f(n) be the minimal total number of comparisons that should be made to select the most beautiful participant, if we admit n girls to the first stage.

The organizers of the competition are insane. They give Noora three integers t, l and r and ask the poor girl to calculate the value of the following expression: t0·f(l) + t1·f(l + 1) + ... + tr - l·f(r). However, since the value of this expression can be quite large the organizers ask her to calculate it modulo 109 + 7. If Noora can calculate the value of this expression the organizers promise her to help during the beauty contest. But the poor girl is not strong in mathematics, so she turned for help to Leha and he turned to you.

Input

The first and single line contains three integers t, l and r (1 ≤ t < 109 + 7, 2 ≤ l ≤ r ≤ 5·106).

Output

In the first line print single integer — the value of the expression modulo 109 + 7.

Example

Input

2 2 4


Output

19

Note

Consider the sample.

It is necessary to find the value of <image>.

f(2) = 1. From two girls you can form only one group of two people, in which there will be one comparison.

f(3) = 3. From three girls you can form only one group of three people, in which there will be three comparisons.

f(4) = 3. From four girls you can form two groups of two girls each. Then at the first stage there will be two comparisons, one in each of the two groups. In the second stage there will be two girls and there will be one comparison between them. Total 2 + 1 = 3 comparisons. You can also leave all girls in same group in the first stage. Then <image> comparisons will occur. Obviously, it's better to split girls into groups in the first way.

Then the value of the expression is <image>.

Solution (in JAVA):

Solution:
	
	        		    import java.awt.Checkbox;
	import java.awt.Point;
	import java.io.*;
	        		    import java.math.*;
	        		    import java.util.*;
	        		    import javax.print.attribute.SetOfIntegerSyntax;
	     
	     
	     
	        		    public class LIS{
	        		    	private static InputStream stream;
	        		    	private static byte[] buf = new byte[1024];
	        		    	private static int curChar;
	        		    	private static int numChars;
	        		    	private static SpaceCharFilter filter;
	        		    	private static PrintWriter pw;
	        		    	private static long count = 0,mod=(long)1e9 + 7;
	        		    //	private static TreeSet<Integer> ts=new TreeSet[200000];
	 
	    		        public static void main(String[] args) {
	    		        	InputReader(System.in);
	    		    		pw = new PrintWriter(System.out); 
	    		            new Thread(null ,new Runnable(){
	    		               public void run(){
	    		                   try{
	    		                       solve();
	    		                       pw.close();
	    		                   } catch(Exception e){
	    		                       e.printStackTrace();
	    		                   }
	    		               }
	    		           },"1",1<<26).start();
	   }
	    public static void Merge(long a[],int p,int r){
	        if(p<r){
	            int q = (p+r)/2;
	            Merge(a,p,q);
	            Merge(a,q+1,r);
	            Merge_Array(a,p,q,r);
	        }
	    }
	    public static void Merge_Array(long a[],int p,int q,int r){
	       long b[] = new long[q-p+1];
	        long c[] = new long[r-q];
	        for(int i=0;i<b.length;i++)
	            b[i] = a[p+i];
	        for(int i=0;i<c.length;i++)
	            c[i] = a[q+i+1];
	        int i = 0,j = 0;
	        for(int k=p;k<=r;k++){
	            if(i==b.length){
	                a[k] = c[j];
	                j++;
	            }
	            else if(j==c.length){
	                a[k] = b[i];
	                i++;
	            }
	            else if(b[i]<c[j]){
	                a[k] = b[i];
	                i++;
	            }
	            else{
	                a[k] = c[j];
	                j++;
	            }
	        }
	    }
		public static long gcd(long x, long y) {
			if (x == 0)
				return y;
			else
				return gcd( y % x,x);
		}	public static boolean isPrime(int n) {
		// Corner cases
			if (n <= 1)
				return false;
			if (n <= 3)
				return true;
	 
			// This is checked so that we can skip 
	// middle five numbers in below loop
			if (n % 2 == 0 || n % 3 == 0)
				return false;
	 
			for (int i = 5; i * i <= n; i = i + 6)
				if (n % i == 0 || n % (i + 2) == 0)
					return false;
	 
			return true;
		}
		public static void test(){
			int t=nextInt();
			while(t-->0){
				solve();
			}
		}
		static Pair p[];
		public static void solve() {


			 long t=nextLong();
	            int l=nextInt();
	            int r=nextInt();
	            long[] ans=new long[r+1];
	            Arrays.fill(ans, -1);
	            long[] min=new long[r+1];
	            Arrays.fill(min, -1);
	            int sqr=(int)Math.sqrt(r);
	            for(int i=2;i<=sqr;i++){
	                if(min[i]==-1){
	                    min[i]=i;
	                    for(int j=i*i;j<=r;j+=i){
	                        if(min[j]==-1){
	                            min[j]=i;
	                        }
	                    }
	                }
	            }
	            ans[1]=0;
	            for(int i=2;i<=r;i++){
	                if(min[i]==-1)
	                    min[i]=i;
	                long x=((long)i/min[i])*(min[i]*(min[i]-1))/2;
	                ans[i]=(x+ans[(int) (i/min[i])])%mod;
	            }
	            //for(int i=2;i<=r;i++)
	                //System.out.println(ans[i]);
	            long ans1=0;
	            long pow=1;
	            for(int i=l;i<=r;i++){
	                //System.out.println(ans[i]);
	                ans1=(ans1+(pow*ans[i])%mod)%mod;
	                pow=(pow*t)%mod;
	            }
	            pw.println(ans1);
		}

		
	          public static long pow(long n, long p) {
				if(p==0)
					return 1;
				if(p==1)
					return n;
				if(p%2==0){
					long temp=pow(n, p/2);
				return (temp*temp);
				}else{
					 	long temp=pow(n,p/2);
					 	temp=(temp*temp);
					 	return(temp*n);
					 	
				}
			}
	    
			        
			        
	        public static int LCS(String a,String b){
	        	int dp[][]=new int [a.length()+1][b.length()+1];
	        	for(int i=0;i<a.length();i++){
	        		for(int j=0;j<b.length();j++){
	        			if(a.charAt(i)==b.charAt(j)){
	        				dp[i+1][j+1]=1+dp[i][j];
	        			}else{
	        				dp[i+1][j+1]=Math.max(dp[i][j+1], dp[i+1][j]);
	        			}
	        		}
	        	}
	        	return dp[a.length()][b.length()];
	        }
	      
	        public static String reverseString(String s) {
				StringBuilder sb = new StringBuilder(s);
				sb.reverse();
				return (sb.toString());
			}
	  
	    		       
	// To Get Input
	// Some Buffer Methods
	 
	    		     	public static void sort(long a[]){
	    		     		Merge(a, 0, a.length-1);
	    		     	}
	    		    	public static void InputReader(InputStream stream1) {
	    		    		stream = stream1;
	    		    	}
	 
	    		    	private static boolean isWhitespace(int c) {
	    		    		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    		    	}
	 
	    		    	private static boolean isEndOfLine(int c) {
	    		    		return c == '\n' || c == '\r' || c == -1;
	    		    	}
	 
	    		    	private static int read() {
	    		    		if (numChars == -1)
	    		    			throw new InputMismatchException();
	    		    		if (curChar >= numChars) {
	    		    			curChar = 0;
	    		    			try {
	    		    				numChars = stream.read(buf);
	    		    			} catch (IOException e) {
	    		    				throw new InputMismatchException();
	    		    			}
	    		    			if (numChars <= 0)
	    		    				return -1;
	    		    		}
	    		    		return buf[curChar++];
	    		    	}
	 
	    		    	private static int nextInt() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		int sgn = 1;
	    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	int res = 0;
	do {
		if (c < '0' || c > '9')
		throw new InputMismatchException();
	res *= 10;
	res += c - '0';
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res * sgn;
	    		    	}
	 
	    		    	private static long nextLong() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		int sgn = 1;
	    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	long res = 0;
	do {
		if (c < '0' || c > '9')
		throw new InputMismatchException();
	res *= 10;
	res += c - '0';
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res * sgn;
	    		    	}
	 
	    		    	private static String nextToken() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		StringBuilder res = new StringBuilder();
	    		    		do {
	    		    			res.appendCodePoint(c);
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res.toString();
	    		    	}
	 
	    		    	private static String nextLine() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		StringBuilder res = new StringBuilder();
	    		    		do {
	    		    			res.appendCodePoint(c);
	    		    			c = read();
	    		    		} while (!isEndOfLine(c));
	    		    		return res.toString();
	    		    	}
	 
	    		    	private static int[] nextIntArray(int n) {
	    		    		int[] arr = new int[n];
	    		    		for (int i = 0; i < n; i++) {
	    		    			arr[i] = nextInt();
	    		    		}
	    		    		return arr;
	    		    	}
	 
	    		    	private static long[][] next2dArray(int n, int m) {
	    		    		long[][] arr = new long[n][m];
	    		    		for (int i = 0; i < n; i++) {
	    		    			for (int j = 0; j < m; j++) {
	    		    				arr[i][j] = nextLong();
	    		    			}
	    		    		}
	    		    		return arr;
	    		    	}
	    		    	private static char[][] nextCharArray(int n,int m){
	    		    		char [][]c=new char[n][m];
	    		    		for(int i=0;i<n;i++){
	    		    			String s=nextLine();
	    		    			for(int j=0;j<s.length();j++){
	    		    				c[i][j]=s.charAt(j);
	    		    			}
	    		    		}
	    		    		return c;
	    		    	}
	 
	    		    	private static long[] nextLongArray(int n) {
	    		    		long[] arr = new long[n];
	    		    		for (int i = 0; i < n; i++) {
	    		    			arr[i] = nextLong();
	    		    		}
	    		    		return arr;
	    		    	}
	 
	    		    	private static void pArray(int[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static void pArray(long[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static void pArray(boolean[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static boolean isSpaceChar(int c) {
	    		    		if (filter != null)
	    		    			return filter.isSpaceChar(c);
	    		    		return isWhitespace(c);
	    		    	}
	 
	    		    	private interface SpaceCharFilter {
	    		    		public boolean isSpaceChar(int ch);
	    		    	}
	        		    }
	    		    	 class Pair implements Comparable<Pair>{
		        				
		    					
		    					int min,bal;
		    					Pair(int prime,int freq){
		    					
		    						this.min=prime;
		    						this.bal=freq;
		    					
		    					}
		    					@Override
		    					public int compareTo(Pair o) {
		    				
		    							
		    					
		    						if(bal>min && o.bal>o.min){
		    							return this.min < o.min ? -1 : 1;
		    						}
		    						if(bal<min && o.bal>o.min){
		    							return 1;
		    						}
		    						if(bal>min && o.bal<o.min){
		    							return -1;
		    						}
		    						return this.bal < o.bal ? 1 : -1;
		    						
		    					}
		    					public int hashCode() {
		    							//int hu = (int) (x ^ (x >>> 32));
		    							//int hv = (int) (y ^ (y >>> 32));
		    							//int hw = (int) (mass ^ (mass >>> 32));
		    							//return 31 * hu + hv ;
		    						return 0;
		    						}
		    						public boolean equals(Object o) {
		    							Pair other = (Pair) o;
		    						//	return x == other.x && y == other.y;
		    						return false;
		    						}
		    				}
	 
	
	    		    	 class Hashing {
							 
							  static final int multiplier = 43;
							  static final Random rnd = new Random();
							  static final int mod1 = BigInteger.valueOf((int) (1e9 + rnd.nextInt((int) 1e9))).nextProbablePrime().intValue();
							  static final int mod2 = BigInteger.valueOf((int) (1e9 + rnd.nextInt((int) 1e9))).nextProbablePrime().intValue();
							  static final int invMultiplier1 = BigInteger.valueOf(multiplier).modInverse(BigInteger.valueOf(mod1)).intValue();
							  static final int invMultiplier2 = BigInteger.valueOf(multiplier).modInverse(BigInteger.valueOf(mod2)).intValue();
					 
							  long[] hash1, hash2;
							  long[] inv1, inv2;
							  int n;
					 
							  public Hashing(String s) {
							    n = s.length();
							    hash1 = new long[n + 1];
							    hash2 = new long[n + 1];
							    inv1 = new long[n + 1];
							    inv2 = new long[n + 1];
							    inv1[0] = 1;
							    inv2[0] = 1;
					 
							    long p1 = 1;
							    long p2 = 1;
							    for (int i = 0; i < n; i++) {
							      hash1[i + 1] = (hash1[i] + s.charAt(i) * p1) % mod1;
							      p1 = p1 * multiplier % mod1;
							      inv1[i + 1] = inv1[i] * invMultiplier1 % mod1;
							      hash2[i + 1] = (hash2[i] + s.charAt(i) * p2) % mod2;
							      p2 = p2 * multiplier % mod2;
							      inv2[i + 1] = inv2[i] * invMultiplier2 % mod2;
							    }
							  }
					 
							  public long getHash(int i, int r) {
								//  i--;
							    return (((hash1[r] - hash1[i] + mod1) * inv1[i] % mod1) << 32)
							        + (hash2[r] - hash2[i] + mod2) * inv2[i] % mod2;
							  }
						}