#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
int ary[200005];
int vis[200005][2];
long long dp[200005][2];
int n;
pair<int, long long> solve(int x, int st) {
  if (vis[x][st] != 0) return make_pair(vis[x][st], dp[x][st]);
  vis[x][st] = 3;
  int nx = x + (st == 0 ? 1 : -1) * ary[x];
  int ny = ary[x];
  int nst = (st + 1) % 2;
  pair<int, long long> res;
  if (nx <= 0 or nx > n)
    res = make_pair(4, ny);
  else if (nx == 1)
    res = make_pair(nst == 0 ? 2 : 1, ny);
  else {
    res = solve(nx, (st + 1) % 2);
    res.second += ny;
  }
  vis[x][st] = res.first;
  dp[x][st] = res.second;
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) scanf("%d", &ary[i]);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 2; ++j) vis[i][j] = 0;
  for (int i = 1; i < n; ++i)
    for (int j = 0; j < 2; ++j) solve(i, j);
  for (int i = 1; i < n; ++i) {
    long long ans = i;
    auto res = solve(1 + i, 1);
    if (res.first == 3 or res.first == 2)
      ans = -1;
    else if (res.first == 4)
      ans += res.second;
    else if (res.first == 1) {
      ans += res.second;
      ans += i;
    }
    printf("%lld\n", ans);
  }
}
