#include <bits/stdc++.h>
using namespace std;
int Array[200005], N;
bool Visited[200005][2];
long long Sum[200005][2], Ans[200005];
set<pair<int, int> > S;
set<pair<int, int> >::iterator it;
bool dfs(int root, int Cur) {
  if (Visited[root][Cur] == true) {
    it = S.find(make_pair(root, Cur));
    if (it != S.end()) {
      Sum[root][Cur] = -1;
      return false;
    }
    if (Sum[root][Cur] != -1)
      return true;
    else
      return false;
  }
  S.insert(make_pair(root, Cur));
  Visited[root][Cur] = true;
  long long x;
  if (Cur == 0)
    x = root - Array[root];
  else
    x = root + Array[root];
  if (x <= 0 || x > N) {
    Sum[root][Cur] = Array[root];
    return true;
  }
  bool Found = dfs(x, Cur ^ 1);
  if (Found == true) {
    Sum[root][Cur] = Array[root] + Sum[x][Cur ^ 1];
    return true;
  } else {
    Sum[root][Cur] = -1;
    return false;
  }
}
int main() {
  scanf("%d", &N);
  for (int i = 2; i <= N; ++i) scanf("%d", Array + i);
  Visited[1][1] = true;
  Sum[1][1] = -1;
  bool Found;
  for (int i = 1; i < N; ++i) {
    Array[1] = i;
    Found = dfs(1 + i, 0);
    if (Found == true)
      Ans[i] = Array[1] + Sum[1 + i][0];
    else
      Ans[i] = -1;
    S.clear();
  }
  for (int i = 1; i < N; ++i) printf("%lld\n", Ans[i]);
  return 0;
}
