#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
int n;
int a[N];
long long dp[N];
bool vis[N];
bool fin[N];
long long DP(int cur) {
  if (cur <= 0 || cur > n) return 0;
  if (cur == 1) return -1;
  if (vis[cur]) {
    if (!fin[cur]) return -1;
    return dp[cur];
  }
  vis[cur] = true;
  long long nxt = cur - a[cur];
  if (nxt <= 0 || nxt > n) {
    fin[cur] = true;
    return dp[cur] = a[cur];
  }
  long long res = DP(nxt + a[nxt]);
  fin[cur] = true;
  if (res == -1) return dp[cur] = -1;
  return dp[cur] = res + a[cur] + a[nxt];
}
int main() {
  while (cin >> n) {
    for (int i = 2; i <= n; ++i) cin >> a[i];
    memset(vis, 0, sizeof(vis));
    memset(fin, 0, sizeof(fin));
    for (int i = 1; i < n; ++i) {
      a[1] = i;
      long long ans = DP(1 + i);
      if (ans == -1)
        cout << (-1) << endl;
      else
        cout << (i + ans) << endl;
    }
  }
}
