#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     int n, dp[105], a, b;     memset(dp, 0, sizeof dp);     cin >> n;     for (int i = 1; i < n; ++i) {       cin >> dp[i];       dp[i] += dp[i - 1];     }     cin >> a >> b;     cout << dp[b - 1] - dp[a - 1];     return 0;   }   