#include <bits/stdc++.h>
using namespace std;
long long dp[200009][2];
long long an[200009][2];
int a[200009];
int n;
void dfs(int x, int j) {
  if (an[x][j]) {
    return;
  }
  an[x][j] = 1;
  int y = j ? (x - a[x]) : (x + a[x]);
  if (y > n || y <= 0) {
    dp[x][j] = a[x];
  } else {
    dfs(y, j ^ 1);
    if (dp[y][j ^ 1] != -1) {
      dp[x][j] = dp[y][j ^ 1] + a[x];
    }
  }
}
int main() {
  while (cin >> n) {
    for (int i = 2; i <= n; i++) cin >> a[i];
    memset(dp, -1, sizeof(dp));
    memset(an, 0, sizeof(an));
    for (int i = 2; i <= n; i++) dfs(i, 1);
    for (int i = 2; i <= n; i++) {
      if (dp[i][1] != -1) dp[i][1] += i - 1;
      cout << dp[i][1] << endl;
    }
  }
}
