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.io.DataInputStream;
	import java.io.FileInputStream;
	import java.io.FileNotFoundException;
	import java.io.FileOutputStream;
	import java.io.IOException;
	import java.io.InputStream;
	import java.io.InputStreamReader;
	import java.io.PrintWriter;
	import java.math.BigInteger;
	import java.util.ArrayList;
	import java.util.Arrays;
	import java.util.Collections;
	import java.util.Comparator;
	import java.util.HashMap;
	import java.util.HashSet;
	import java.util.InputMismatchException;
	import java.util.Iterator;
	import java.util.LinkedList;
	import java.util.PriorityQueue;
	import java.util.Queue;
	import java.util.Random;
	import java.util.Scanner;
	import java.util.Stack;
	import java.util.StringTokenizer;
	import java.util.TreeMap;
	import java.util.TreeSet;
	
	import java.util.BitSet;
	
	public class Main {
		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 mod = 1000000000 + 7;
		private static int MAX=1000001;
		private static int block;
		private static void soln(){
			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 bfs(LinkedList<Pair1>[] list,int cur,long cost,int x){
			if(cur==x+1)
				return cost;
			if(cur>x+1)
				return Long.MAX_VALUE;
			long temp=Long.MAX_VALUE;
			System.out.println(cur);
			for(Pair1 p:list[cur]){
				int r=p.i;
				long c=p.li;
				temp=Math.min(temp,bfs(list,r+1,cost+c,x));
			}
			return temp;
		}
		private static class Pair1 {
			int i;
			long li;
			public Pair1(int a,long b){
				i=a;li=i+b;
			}
			
		}
		private static int[] buildSuffix(String s,int n){
			Integer[] order=new Integer[n];
			for(int i=0;i<n;i++) order[i]=n-i-1;
			Arrays.sort(order,(a,b) -> Character.compare(s.charAt(a),s.charAt(b)));
			int[] sa=new int[n];
			int[] m_tmp=new int[n];
			for(int i=0;i<n;i++){
				sa[i]=order[i];
				m_tmp[i]=s.charAt(i);
			}
			for(int len=1;len<n;len<<=1){
				int[] tmp=m_tmp.clone();
				m_tmp[sa[0]]=0;
				for(int i=1;i<n;i++){
					m_tmp[sa[i]] = (tmp[sa[i-1]]==tmp[sa[i]] && tmp[(sa[i-1]+len>>1)%n]==tmp[(sa[i]+len>>1)%n]) ? m_tmp[sa[i-1]]:i;
				}
				int[] cnt=new int[n];
				for(int i=0;i<n;i++) cnt[i]=i;
				int[] sa_tmp=sa.clone();
				for(int i=0;i<n;i++){
					int s1=(sa_tmp[i]-len+n)%n;
					sa[cnt[m_tmp[s1]]++]=s1;
				}
			}
			return sa;
		}
		private static int[] buildLCP(int[] sa,String s,int n){
			int[] ind=new int[n];
			for(int i=0;i<n;i++)
				ind[sa[i]]=i;
			int[] lcp=new int[n];
			for(int i=0, k=0; i<n; i++)
				if(ind[i] < n-1){
					for(int j=sa[ind[i]+1]; Math.max(i,j)+k < n && s.charAt(i+k)==s.charAt(j+k);) k++;
					lcp[ind[i]]=k;
					if(k>0) k--;
				}
			return lcp;
		}
		private static int[] buildLCP1(int[] sa,String s,int n){
			int[] ind=new int[n+1];
			for(int i=1;i<=n;i++)
				ind[sa[i]]=i;
			int[] lcp=new int[n+1];
			for(int i=1, k=0; i<=n; i++)
				if(ind[i] < n){
					for(int j=sa[ind[i]+1]; Math.max(i,j)+k <= n && s.charAt(i+k-1)==s.charAt(j+k-1);) k++;
					lcp[ind[i]]=k;
					if(k>0) k--;
				}
			return lcp;
		}
		static class Pair implements Comparable<Pair>{
			int i;
			int j;
			int ind;
			public Pair(int a,int b,int c){
				i=a;
				j=b;
				ind=c;
			}
			@Override
			public int compareTo(Pair arg0) {
				return this.i-arg0.i;
			}
		}
		public static class Segment {
		    private int[][] tree;
		    //private int[] cnt2;
		    private int size;
		    private int n;
		    private class node{
		        private int a;
		        private int b;
		        private int c;
		        public node(int x,int y,int z){
		            a=x;
		            b=y;
		            c=z;
		        }
		    }
		    public Segment(int n){
		        //this.base=arr;
		        int x = (int) (Math.ceil(Math.log(n) / Math.log(2)));
		        size = 2 * (int) Math.pow(2, x) - 1;
		        tree=new int[size][2];
		        //cnt2=new int[size];
		        this.n=n;
		        //build(0,0,n-1);
		    }
		    /*private void build(int id,int l,int r){
		        //pw.println(1);
		        if(r==l){
		            tree[id]=1;
		            return;
		        }
		        int mid=l+(r-l)/2;
		        //System.out.println(2*id+1+" "+l+" "+mid);
		        build(2*id+1,l,mid);
		        //System.out.println(2*id+2+" "+(mid+1)+" "+r);
		        build(2*id+2,mid+1,r);
		        tree[id]=tree[2*id+1]+tree[2*id+2];
		    }*/
		    public String query(int j,int i){
		        return queryUtil(j,i,0,0,n-1);
		    }
		    private String queryUtil(int j,int i,int id,int l,int r){
		        int mid=l+(r-l)/2;
		        if(l==r){
		        	return l+" "+j;
		        }
		        long val1=((long)tree[(id<<1)|1][0])*((long)i)+(long)tree[2*id+1][1];
		        //System.out.println(val1+" "+j+" "+l+" "+r);
		        if(val1>=j)
		        	return queryUtil(j,i,(id<<1)|1,l,mid);
		        else
		        	return queryUtil(j-(int)val1,i,2*id+2,mid+1,r);
		    }
		    /*private void cnt(int id,int l,int r,HashSet<Integer> set){
		        if(tree[id]!=0){
		            set.add(tree[id]);
		            return;
		        }
		        if(r==l)
		            return;
		        int mid=l+(r-l)/2;
		        cnt(2*id+1,l,mid,set);
		        cnt(2*id+2,mid+1,r,set);
		    }*/
		    public void update(int i,int f,int val){
		    	updateUtil(i,f,val,0,0,n-1);
		    }
		    public void updateUtil(int i,int f,int val,int id,int l,int r){
		        if(l==r){
		        	tree[id][f]=val;
		        	return;
		        }
		        int mid=l+(r-l)/2;
		        //shift(id);
		        if(l<=i && i<=mid)
		        	updateUtil(i,f,val,2*id+1,l,mid);
		        else
		        	updateUtil(i,f,val,2*id+2,mid+1,r);
		        tree[id][f]=tree[2*id+1][f]+tree[2*id+2][f];
		        //tree[id][1]=tree[(id<<1)|1][1]+tree[(id<<1)+2][0];
		    }
		   /* private void shift(int id){
		        if(tree[id]!=0){
		            tree[2*id+1]=tree[2*id+2]=tree[id];
		        }
		        tree[id]=0;
		    }*/
		}
		private static class DSU{
			int[] parent;
			public DSU(int n){
				parent=new int[n];
				for(int i=0;i<n;i++)
					parent[i]=i;
			}
			int find(int i){
		        while(parent[i] !=i){
		        	parent[i]=parent[parent[i]];
		        	i=parent[i];
		        }
		        return i;
		    }
			void Union(int x, int y){
		        int xset = find(x);
		        int yset = find(y);
		        parent[yset]=yset;
		        parent[xset] = yset;
		    }
		}
		public static class Merge {
		    public static void sort(long inputArr[]) {
		        int length = inputArr.length;
		        doMergeSort(inputArr,0, length - 1);
		    }
		    private static void doMergeSort(long[] arr,int lowerIndex, int higherIndex) {        
		        if (lowerIndex < higherIndex) {
		            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
		            doMergeSort(arr,lowerIndex, middle);
		            doMergeSort(arr,middle + 1, higherIndex);
		            mergeParts(arr,lowerIndex, middle, higherIndex);
		        }
		    }
		    private static void mergeParts(long[]array,int lowerIndex, int middle, int higherIndex) {
		        long[] temp=new long[higherIndex-lowerIndex+1];
		        for (int i = lowerIndex; i <= higherIndex; i++) {
		            temp[i-lowerIndex] = array[i];
		        }
		        int i = lowerIndex;
		        int j = middle + 1;
		        int k = lowerIndex;
		        while (i <= middle && j <= higherIndex) {
		            if (temp[i-lowerIndex] < temp[j-lowerIndex]) {
		                array[k] = temp[i-lowerIndex];
		                i++;
		            } else {
		                array[k] = temp[j-lowerIndex];
		                j++;
		                //cnt+=(middle+1-i);
		            }
		            k++;
		        }
		        while (i <= middle) {
		            array[k] = temp[i-lowerIndex];
		            k++;
		            i++;
		        }
		        while(j<=higherIndex){
		            array[k]=temp[j-lowerIndex];
		            k++;
		            j++;
		        }
		        /*pw.println(lowerIndex+" "+higherIndex);
		        for(int m=lowerIndex;m<=higherIndex;m++)
		            pw.print(array[m]+" ");
		        pw.println();*/
		    }
	
		}
	
		private static class Edge{
			int x;
			int y;
			int i;
			public Edge(int a,int b,int c){
				x=a; y=b;i=c;
			}
		}
		private static long pow(long a, long b, long c) {
			if (b == 0)
				return 1;
			long p = pow(a, b / 2, c);
			p = (p * p) % c;
			return (b % 2 == 0) ? p : (a * p) % c;
		}
		
		private static class Mo implements Comparable<Mo>{
			int l;
			int r;
			int i;
			int val;
			public Mo(int a,int b,int ind,int d) {
				l=a;r=b;i=ind;val=d;
			}
			@Override
			public int compareTo(Mo arg0) {
				int b1=this.l/block;
				int b2=arg0.l/block;
				return (b1!=b2)?(b1-b2):(this.r-arg0.r);
			}
		}
	
		private static long gcd(long n, long l) {
			if (l == 0)
				return n;
			return gcd(l, n % l);
		}
	
		private static long max(long a, long b) {
			if (a > b)
				return a;
			return b;
		}
	
		private static long min(long a, long b) {
			if (a < b)
				return a;
			return b;
		}
	
		public static void main(String[] args) throws Exception {
			new Thread(null,new Runnable(){
				@Override
				public void run() {
					/*try {
						InputReader(new FileInputStream("C:\\Users\\hardik\\Desktop\\C-small-1-attempt1.in"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					/*try {
					InputReader(new FileInputStream("/root/codes/in.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					InputReader(System.in);
					pw = new PrintWriter(System.out);
					/*try {
						pw=new PrintWriter(new FileOutputStream("C:\\Users\\hardik\\Desktop\\out.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					/*try {
						pw=new PrintWriter(new FileOutputStream("/root/codes/out.txt"));
					} catch (FileNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}*/
					soln();
					pw.close();
				}
			},"1",1<<26).start();
		}
	
		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[] 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++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}
	
		private static void pArray(long[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			return;
		}
	
		private static boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}
		private static char nextChar() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			char c1=(char)c;
			while(!isSpaceChar(c))
				c=read();
			return c1;
	}
		private interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}