#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[200001];
long long val[500001][2];
long long vis[200001][2];
void dfs(long long cur, long long par) {
  vis[cur][par] = 1;
  long long ind = par;
  if (ind == 0) ind = -1;
  long long nw = cur + ind * a[cur];
  long long add = a[cur];
  if (nw > n || nw <= 0) {
    val[cur][par] = a[cur];
    return;
  } else if (nw == 1) {
    val[cur][par] = LLONG_MAX;
    return;
  } else {
    long long tp = par ^ 1;
    if (vis[nw][tp] == 0) dfs(nw, tp);
    long long temp = val[nw][tp];
    if (temp == LLONG_MAX || temp == -1)
      val[cur][par] = LLONG_MAX;
    else
      val[cur][par] = temp + a[cur];
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  long long i, j, m;
  cin >> n;
  memset(vis, 0, sizeof(vis));
  memset(val, -1, sizeof(val));
  for (i = 2; i <= n; i++) cin >> a[i];
  for (i = 2; i <= n; i++) {
    if (vis[i][0] == 0) {
      dfs(i, 0);
    }
    if (vis[i][1] == 0) {
      dfs(i, 1);
    }
  }
  for (i = 2; i <= n; i++) {
    if (val[i][0] == LLONG_MAX)
      cout << "-1\n";
    else
      cout << val[i][0] + i - 1 << "\n";
  }
  return 0;
}
