#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
long long n, m, i, j, k, l, r, s, t, d, u, ii, jj, x, y, z, h[N], hh[N][2],
    dp[N][2];
long long f(long long x, int d) {
  if (x < 1 or x > n) return 0;
  if (x == 1 and d) return -1;
  long long &r = dp[x][d], y;
  if (r) return r;
  if (hh[x][d]) return r = -1;
  hh[x][d] = 1;
  y = f(x + (d ? 1 : -1) * h[x], 1 - d);
  if (y == -1)
    r = -1;
  else
    r = y + h[x];
  return r;
}
int main() {
  cin >> n;
  for (i = 2; i <= n; i++) scanf("%lld", h + i);
  for (i = 2; i <= n; i++) {
    x = f(i, 0);
    if (x != -1) x += i - 1;
    printf("%lld\n", x);
  }
}
