The Berland Armed Forces System consists of n ranks that are numbered using natural numbers from 1 to n, where 1 is the lowest rank and n is the highest rank.

One needs exactly di years to rise from rank i to rank i + 1. Reaching a certain rank i having not reached all the previous i - 1 ranks is impossible.

Vasya has just reached a new rank of a, but he dreams of holding the rank of b. Find for how many more years Vasya should serve in the army until he can finally realize his dream.

Input

The first input line contains an integer n (2 ≤ n ≤ 100). The second line contains n - 1 integers di (1 ≤ di ≤ 100). The third input line contains two integers a and b (1 ≤ a < b ≤ n). The numbers on the lines are space-separated.

Output

Print the single number which is the number of years that Vasya needs to rise from rank a to rank b.

Examples

Input

3
5 6
1 2


Output

5


Input

3
5 6
1 3


Output

11
import java.util.*;
import java.io.BufferedInputStream;
import java.math.*;
import static java.lang.Math.*;
public class Main{
	public static void main(String[]args){
		A38 a=new A38();
		a.solve();
	}
}

class A96{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));
	public void solve(){
		while(input.hasNext()){
			String s=input.next();
			s=s.replaceAll("0000000","*");
			s=s.replaceAll("1111111","*");
			if(s.contains("*"))System.out.println("YES");
			else System.out.println("NO");
		}
	}
}

class A112{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));
	public void solve(){
		String a=input.nextLine();
		String b=input.nextLine();
		if(a.compareToIgnoreCase(b)<0)System.out.println(-1);
		else if(a.compareToIgnoreCase(b)==0)System.out.println(0);
		else System.out.println(1);
	}
}

class A339{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));
	public void solve(){
		int []a=new int[1000];
		String s=input.nextLine();
		int t=0;
		for(int i=0;i<s.length();i++){
			if(Character.isDigit(s.charAt(i))){
				a[t++]=s.charAt(i)-'0';
			}
		}
		Arrays.sort(a,0,t);
		for(int i=0;i<t-1;i++){
			System.out.print(a[i]+"+");
		}
		System.out.println(a[t-1]);
	}
}

class B508{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));
	public void solve(){
		StringBuilder s;
		s=new StringBuilder(input.nextLine());
		boolean ok=false;
		int n=s.length();
		int m=s.charAt(n-1)-'0';
		for(int i=0;i<n;i++){
			if(ok)break;
			int t=s.charAt(i)-'0';
			if(t%2==0&&t<m){
				Character tc=s.charAt(i);
				s.setCharAt(i,s.charAt(n-1));
				s.setCharAt(n-1,tc);
				ok=true;
			}
		}

		if(ok){
			System.out.println(s);
		}
		else {
			for(int i=n-2;i>=0;i--){
				int t=s.charAt(i)-'0';
				if(t%2==0){
					Character tc=s.charAt(i);
					s.setCharAt(i,s.charAt(n-1));
					s.setCharAt(n-1,tc);
					ok=true;
					break;
				}
			}
			if(ok)System.out.println(s);
			else System.out.println(-1);
		}
	}
}

class A352{
	Scanner input=new Scanner(new BufferedInputStream(System.in));
	public void solve(){
		int n=input.nextInt();
		int t,t5=0,t0=0;
		for(int i=0;i<n;i++){
			t=input.nextInt();
			if(t==5)t5++;
			if(t==0)t0++;
		}
		if(t0==0)System.out.println(-1);
		else if(t5>=9){
			int tt=t5/9;
			while(tt-->0)
				for(int i=0;i<9;i++)System.out.print(5);
			for(int i=0;i<t0;i++)System.out.print(0);
			System.out.println();
		}
		else System.out.println(0);
	}
}

class A629{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));
	private int [][]a=new int[105][105];
	private String []s=new String[105];

	public void solve(){
		int n=input.nextInt();
		input.nextLine();
		for(int i=0;i<n;i++){
			s[i]=input.nextLine();
			Arrays.fill(a[i],0);
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				if(s[i].charAt(j)=='C'){
					a[i][n]++;
					a[n][j]++;
				}
			}
		}
		int ans=0;
		for(int i=0;i<n;i++){
			ans+=a[i][n]*(a[i][n]-1)/2;
			ans+=a[n][i]*(a[n][i]-1)/2;
		}
		System.out.println(ans);
	}
}

class A320{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));

	public void solve(){
		String s=input.nextLine();
		s=s.replaceAll("[^14]","&");
		s=s.replaceAll("144","---");
		s=s.replaceAll("14","--");
		s=s.replaceAll("1","-");
		s=s.replaceAll("[-]","");
		if(s.length()==0)System.out.println("YES");
		else System.out.println("NO");
	}
}

class A38{
	private Scanner input=new Scanner(new BufferedInputStream(System.in));

	public void solve(){
		int n=input.nextInt();
		int []a=new int[105];
		for(int i=0;i<n-1;i++){
			a[i]=input.nextInt();
		}
		int s=input.nextInt();
		int b=input.nextInt();
		int ans=0;
		for(int i=s-1;i<b-1;i++){
			ans+=a[i];
		}
		System.out.println(ans);
	}
}