#include <bits/stdc++.h>
using namespace std;
int n, a[200005], vis[200005][2];
long long memo[200005][2];
long long dfs(int x, int d) {
  if (x < 0 || x >= n) return 0;
  if (vis[x][d] == 1) return -1;
  if (vis[x][d] == 2) return memo[x][d];
  vis[x][d] = 1;
  long long v = dfs(d ? x - a[x] : x + a[x], !d);
  vis[x][d] = 2;
  if (v == -1)
    return memo[x][d] = -1;
  else
    return memo[x][d] = a[x] + v;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) scanf("%d", &a[i]);
  memset(vis, 0, sizeof(vis));
  vis[0][0] = 1;
  for (int i = 1; i < n; ++i) {
    if (!vis[i][1]) dfs(i, 1);
    if (memo[i][1] == -1)
      printf("-1\n");
    else
      printf("%I64d\n", memo[i][1] + i);
  }
  return 0;
}
