#include <bits/stdc++.h>
using namespace std;
int sum[101] = {0}, rise[101] = {0};
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n - 1; i++) {
    cin >> rise[i];
    sum[i] = rise[i] + sum[i - 1];
  }
  int a, b;
  cin >> a >> b;
  cout << sum[b - 1] - sum[a - 1];
  return 0;
}
