#include <bits/stdc++.h>
using namespace std;
long long dp[200005][2];
int vis[200005][2];
int a[200005], n;
void dfs(int x, int d) {
  if (vis[x][d % 2]) return;
  vis[x][d % 2] = 1;
  if (d & 1) {
    int y = x - a[x];
    if (y <= 0) {
      dp[x][d % 2] = a[x];
      return;
    }
    dfs(y, d + 1);
    if (dp[y][(d + 1) % 2] != -1) dp[x][d % 2] = dp[y][(d + 1) % 2] + a[x];
  } else {
    int y = x + a[x];
    if (y > n) {
      dp[x][d % 2] = a[x];
      return;
    }
    dfs(y, d + 1);
    if (dp[y][(d + 1) % 2] != -1) dp[x][d % 2] = dp[y][(d + 1) % 2] + a[x];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  memset(vis, 0, sizeof(vis));
  memset(dp, -1, sizeof(dp));
  dp[1][0] = -1;
  vis[1][0] = 1;
  dp[1][1] = 0;
  vis[1][1] = 1;
  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;
  for (int i = 2; i <= n; i++) cout << dp[i][1] << endl;
  return 0;
}
