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:
/*
 * Author: Abhi Sapariya
 */
import java.util.*;
import java.io.*;
import java.math.*;
import java.text.DecimalFormat;

public class Solution{
	
	static long mod =(long)Math.pow(10,9)+7;
	static int INFP = Integer.MAX_VALUE;
	static int INFN = Integer.MIN_VALUE;
	static InputReader in;
    static PrintWriter out;
	
	public static void main(String[] args) {
		
		in = new InputReader(System.in);
		out = new PrintWriter(System.out);
		
		//CODE
        long t=in.nextLong();
        int l=in.nextInt();
        int r=in.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;
        }
        out.println(ans1);

	    out.close();
	}
	
	static int max(int a, int b){
		return Math.max(a, b);
	}
	
	static long max(long a, long b){
		return Math.max(a, b);
	}
	static int min(int a, int b){
		return Math.min(a, b);
	}
	
	static long min(long a, long b){
		return Math.min(a,b);
	}
	
	static int abs(int a, int b){
		return Math.abs(a-b);
	}
	
	static long abs(long a, long b){
		return Math.abs(a-b);
	}
	
	static int sqrt(int a){
		return (int) Math.sqrt(a);
	}
	
	static long sqrt(long a){
		return (long) Math.sqrt(a);
	}
	
	static int gcd(int a, int b) {
		if (a == 0 || b == 0)
			return a + b;
		return gcd(b, a % b);
	}
	
	static long gcd(long a, long b) {
		if (a == 0 || b == 0)
			return a + b;
		return gcd(b, a % b);
	}
	
    static int power(int base, int exponent, int modulus){
	    int result = 1;
	    while (exponent > 0) {
	        if (exponent % 2 == 1)
	            result = (result * base) % modulus;
	        exponent = exponent >> 1;
	        base = (base * base) % modulus;
	    }
	    return result;
	}
	
    static long power(long base, long exponent, long modulus){
	    long result = 1L;
	    while (exponent > 0) {
	        if (exponent % 2L == 1L)
	            result = (result * base) % modulus;
	        exponent = exponent >> 1;
	        base = (base * base) % modulus;
	    }
	    return result;
	}
    
    // This class represents a directed graph using adjacency list
	// representation
	class Graph {
		private int V; // No. of vertices

		// Array  of lists for Adjacency List Representation
		private LinkedList<Integer> adj[];

		// Constructor
		Graph(int v) {
			V = v;
			adj = new LinkedList[v];
			for (int i = 0; i < v; ++i)
				adj[i] = new LinkedList<Integer>();
		}

		//Function to add an edge into the graph
		void addEdge(int v, int w) {
			adj[v].add(w); // Add w to v's list.
		}

		// A function used by DFS
		void DFSUtil(int v, boolean visited[]) {
			// Mark the current node as visited and print it
			visited[v] = true;
			System.out.print(v + " ");

			// Recur for all the vertices adjacent to this vertex
			Iterator<Integer> i = adj[v].listIterator();
			while (i.hasNext()) {
				int n = i.next();
				if (!visited[n])
					DFSUtil(n, visited);
			}
		}

		// The function to do DFS traversal. It uses recursive DFSUtil()
		void DFS(int v) {
			// Mark all the vertices as not visited(set as
			// false by default in java)
			boolean visited[] = new boolean[V];

			// Call the recursive helper function to print DFS traversal
			DFSUtil(v, visited);
		}
	}
    
    // Binary indexed Tree parameters (arr,arr.length)
    static class BITree {

		int[] tree;

		public BITree(int arr[], int n) {
			tree = new int[n + 1];
			for (int i = 0; i < n; i++) {
				update(i, arr[i]);
			}
		}

		public void update(int x, int val) {
			x++;
			while (x < tree.length) {
				tree[x] += val;
				x = next(x);
			}
		}

		public int sum(int x) {
			x++;
			int ans = 0;
			while (x > 0) {
				ans += tree[x];
				x = parent(x);
			}
			return ans;
		}

		public int parent(int x) {
			return x - (x & -x);
		}

		public int next(int x) {
			return x + (x & -x);
		}

	}
    
    // Range minimum query Segment Tree parameters - (arr,arr.length)
    static class SegmentTree {

		static int[] segT;

		public SegmentTree(int arr[], int n) {
			int nearPow = (int) (Math.ceil(Math.log(n) / Math.log(2)));
			int len = 2 * ((int) Math.pow(2, nearPow)) - 1;
			segT = new int[len];
			constructTree(arr, 0, n - 1, 0);
		}

		public void constructTree(int arr[], int low, int high, int pos) {
			if (low == high) {
				segT[pos] = arr[low];
				return;
			}

			int mid = (low + high) / 2;
			constructTree(arr, low, mid, 2 * pos + 1);
			constructTree(arr, mid + 1, high, 2 * pos + 2);
			segT[pos] = Math.min(segT[2 * pos + 1], segT[2 * pos + 2]);
		}

		public int rmq(int low, int high, int n) {
			return rmq(0, n - 1, low, high, 0);
		}

		public int rmq(int low, int high, int qlow, int qhigh, int pos) {

			if (qlow <= low && qhigh >= high) {
				return segT[pos];
			}
			if (high < qlow || qhigh < low) {
				return Integer.MAX_VALUE;
			}
			int mid = (low + high) / 2;
			return Math.min(rmq(low, mid, qlow, qhigh, 2 * pos + 1),
					rmq(mid + 1, high, qlow, qhigh, 2 * pos + 2));
		}

	} 
	
	// Nth fibonacci number%mod in log(n)
	static class fibonacci {
		public static long fib(long n, long mod) {
			long F[][] = new long[][] { { 1, 1 }, { 1, 0 } };
			if (n == 0l)
				return 0l;
			power(F, n - 1, mod);

			return F[0][0] % mod;
		}

		public static void multiply(long F[][], long M[][], long mod) {
			long x = (((F[0][0]) * (M[0][0])) % mod + ((F[0][1]) * (M[1][0]))
					% mod)
					% mod;
			long y = (((F[0][0]) * (M[0][1])) % mod + ((F[0][1]) * (M[1][1]))
					% mod)
					% mod;
			long z = (((F[1][0]) * (M[0][0])) % mod + ((F[1][1]) * (M[1][0]))
					% mod)
					% mod;
			long w = (((F[1][0]) * (M[0][1])) % mod + ((F[1][1]) * (M[1][1]))
					% mod)
					% mod;

			F[0][0] = x;
			F[0][1] = y;
			F[1][0] = z;
			F[1][1] = w;
		}

		/* Optimized version of power() in method 4 */
		public static void power(long F[][], long n, long mod) {
			if (n == 0l || n == 1l)
				return;
			long M[][] = new long[][] { { 1l, 1l }, { 1l, 0l } };

			power(F, n / 2l, mod);
			multiply(F, F, mod);
			if (n % 2l != 0l)
				multiply(F, M, mod);
		}
		
		static boolean isPerfectSquare(int x)
		{
		    int s = sqrt(x);
		    return (s*s == x);
		}
		 
		// Returns true if n is a Fibinacci Number, else false
		static boolean isFibonacci(int n)
		{
		    // n is Fibinacci if one of 5*n*n + 4 or 5*n*n - 4 or both
		    // is a perferct square
		    return isPerfectSquare(5*n*n + 4) ||
		           isPerfectSquare(5*n*n - 4);
		}
	}
	
	// Class for primes utilities
	static class primes{
		
	    //for marking all prime numbers greater than 1 and less than equal to N
	    static boolean[] sieveOfEratosthenes(int n) {

			boolean prime[] = new boolean[n];
			// Create a boolean array "prime[0..n]" and initialize
			// all entries it as true. A value in prime[i] will
			// finally be false if i is Not a prime, else true.
			for (int i = 0; i < n; i++)
				prime[i] = true;

			for (int p = 2; p * p <= n; p++) {
				// If prime[p] is not changed, then it is a prime
				if (prime[p] == true) {
					// Update all multiples of p
					for (int i = p * 2; i <= n; i += p)
						prime[i] = false;
				}
			}
			
			return prime;
		}
		
	    static ArrayList<Long> primeFactors(long n){
	    	ArrayList<Long> ans = new ArrayList<Long>();
	    	// Print the number of 2s that divide n
	        while (n%2L==0L)
	        {
	            ans.add(2L);
	            n /= 2L;
	        }
	 
	        // n must be odd at this point.  So we can
	        // skip one element (Note i = i +2)
	        for (long i = 3; i <= Math.sqrt(n); i+= 2L)
	        {
	            // While i divides n, print i and divide n
	            while (n%i == 0)
	            {
	            	ans.add(i);
	                n /= i;
	            }
	        }
	 
	        // This condition is to handle the case whien
	        // n is a prime number greater than 2
	        if (n > 2)
	            ans.add(n);
	        return ans;
	    }
	
	    //Minimum prime factors of number till n
		static int[] minimumPrimeFactors(int n){
			int[] minPrime = new int[n+1];
			minPrime[1]=1;
	        for (int i = 2; i * i <= n; ++i) {
	            if (minPrime[i] == 0) {         //If i is prime
	                for (int j = i * i; j <= n; j += i) {
	                    if (minPrime[j] == 0) {
	                        minPrime[j] = i;
	                    }
	                }
	            }
	        }
	        for (int i = 2; i <= n; ++i) {
	            if (minPrime[i] == 0) {
	                minPrime[i] = i;
	            }
	        }
	        return minPrime;
		}
		
	    // isPrime
		static boolean isPrime(long n) {
			if(n < 2L) return false;
			if(n == 2L || n == 3L) return true;
			if(n%2L == 0 || n%3L == 0) return false;	
			long sqrtN = (long)Math.sqrt(n)+1L;
			for(long i = 6L; i <= sqrtN; i += 6L) {
				if(n%(i-1) == 0 || n%(i+1) == 0) return false;
			}
			return true;
		}
	
	}
	
	static long modInverse(long A, long M)
	{
		long x=extendedEuclid(A,M)[0];
		return (x%M+M)%M;    //x may be negative
	}
	
	
	static long[] extendedEuclid(long A, long B) {
		if(B == 0) {
			long d = A;
			long x = 1;
			long y = 0;
			return new long[]{x,y,d};
		}
		else {
			long arr[]=extendedEuclid(B, A%B);
			long temp = arr[0];
			arr[0] = arr[1];
			arr[1] = temp - (A/B)*arr[1];
			return arr;
		}
	}
	
	public void printArr(int[] arr){
		for(int i = 0; i < arr.length; i++){
			out.print(arr[i] + " ");
		}
		out.println();
	}
	
	public void print2DArr(int[][] arr){
		for( int i = 0; i < arr.length; i++){
			for ( int j = 0; j < arr[0].length; j++){
				out.print(arr[i][j] + " ");
			}
			out.println();
		}
	}
 
	static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, numChars;
        private SpaceCharFilter filter;
 
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        
        public 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++];
        }
 
        public 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();
        }
 
        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
 
        public 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;
        }
 
        public 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;
        }
 
        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
 
        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
        
        public int[][] nextInt2DArray(int n, int m){
        	int[][] arr = new int[n][m];
        	for (int i = 0; i < n; i++){
        		for(int j = 0; j < m; j++){
        			arr[i][j] = nextInt();
        		}
        	}
        	return arr;
        }
        
        public long[][] nextLong2DArray(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;
        }
 
        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
	}
}