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