#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long b, long long mod) {
  if (b == 0 || a == 1) {
    if (mod == 1)
      return 0;
    else
      return 1;
  }
  if (b % 2 == 0) {
    long long k = powmod(a, b / 2, mod);
    return (k * k) % mod;
  } else {
    long long k = powmod(a, b / 2, mod);
    return ((k * k) % mod * a) % mod;
  }
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a > b)
    return gcd(a % b, b);
  else
    return gcd(b % a, a);
}
long long prime(long long p) {
  for (long long i = 2; i * i <= p; i++) {
    if (p % i == 0 && i < p) return i;
  }
  return 1;
}
long long sqr(long long i) { return i * i; }
long long n, a[200005], dp[200005][2];
bool visited[200005][2];
long long solve(long long x, bool d) {
  if (x < 1 || x > n) return 0;
  if (visited[x][d]) return dp[x][d];
  visited[x][d] = 1;
  dp[x][d] = -1;
  long long ans = solve(x + a[x] * (d ? 1 : -1), !d);
  if (ans != -1) ans += a[x];
  return dp[x][d] = ans;
}
void solve(long long ppppppppp = 1) {
  cin >> n;
  for (long long i = 2; i <= n; i++) cin >> a[i];
  for (long long i = 1; i < n; i++) {
    a[1] = i;
    visited[1][0] = visited[1][1] = 0;
    cout << solve(1, 1) << endl;
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tututu;
  tututu = 1;
  for (long long qwerty = 0; qwerty < tututu; qwerty++) solve();
  return 0;
}
