#include <bits/stdc++.h>
using namespace std;
int const N = 200001;
int n, v[N], vs[N], c;
long long dp[N][2];
long long go(int x, bool f) {
  if (x > n || x <= 0) return 0;
  long long &ret = dp[x][f];
  if (~ret) return ret;
  ret = -1e18;
  if (!f)
    ret = go(x + v[x], f ^ 1) + v[x];
  else
    ret = go(x - v[x], f ^ 1) + v[x];
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) scanf("%d", v + i);
  memset(dp, -1, sizeof dp);
  for (int i = 1; i < n; ++i) {
    v[1] = i;
    dp[1][0] = dp[1][1] = -1;
    c = i;
    printf("%lld\n", max(-1ll, go(1, 0)));
  }
}
