#include <bits/stdc++.h>
using namespace std;
int n, dat[200005], vis[200005][2];
long long dp[200005][2], ans;
long long dfs(int cur, int d) {
  if (cur < 1 || cur > n) return 0;
  if (vis[cur][d] == 1) return -1;
  if (vis[cur][d] == 2) return dp[cur][d];
  vis[cur][d] = 1;
  dp[cur][d] += dat[cur];
  long long res = dfs(cur + (d ? dat[cur] : -dat[cur]), d ^ 1);
  if (res == -1) {
    dp[cur][d] = -1;
  } else {
    dp[cur][d] += res;
  }
  vis[cur][d] = 2;
  return dp[cur][d];
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; ++i) {
    cin >> dat[i];
  }
  vis[1][0] = vis[1][1] = 1;
  for (int i = 2; i <= n; ++i) {
    ans = dfs(i, 0);
    if (ans == -1) {
      cout << -1 << endl;
    } else {
      ans += i - 1;
      cout << ans << endl;
    }
  }
}
