#include <bits/stdc++.h>
using namespace std;
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
long long inf = 1e18, MOD = 1e9 + 7;
const int nax = 2e5 + 10;
long long n, a[nax], vis[nax][2], adj[nax][2], dp[nax][2];
void dfs(long long ver, int p) {
  vis[ver][p] = 1;
  if (adj[ver][p] == 0 || adj[ver][p] == n + 1) {
    dp[ver][p] = a[ver];
    return;
  }
  if (vis[adj[ver][p]][1 - p]) {
    if (dp[adj[ver][p]][1 - p] != -1)
      dp[ver][p] = dp[adj[ver][p]][1 - p] + a[ver];
    return;
  }
  dfs(adj[ver][p], 1 - p);
  if (dp[adj[ver][p]][1 - p] != -1)
    dp[ver][p] = a[ver] + dp[adj[ver][p]][1 - p];
}
void solve() {
  cin >> n;
  for (long long i = 0; i <= n + 1; i++) dp[i][0] = dp[i][1] = -1;
  for (long long i = 2; i <= n; i++) {
    long long x;
    cin >> x;
    a[i] = x;
    adj[i][0] = max(0ll, i - x);
    adj[i][1] = min(n + 1, i + x);
  }
  vis[1][1] = 1;
  for (long long i = 2; i <= n; i++) {
    if (!vis[i][0]) dfs(i, 0);
  }
  for (long long i = 2; i <= n; i++) {
    cout << (dp[i][0] == -1 ? -1 : dp[i][0] + i - 1) << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int ti = 1;
  for (int i = 1; i <= ti; i++) {
    solve();
  }
  return 0;
}
