#include <bits/stdc++.h>
long long A[200005];
long long dp[200005][2];
long long dfs(int cur, int d, int n) {
  long long res;
  if (cur <= 0 || cur > n) return 0;
  if (dp[cur][d]) return dp[cur][d];
  dp[cur][d] = -1;
  if (d == 1)
    res = dfs(cur - A[cur], 0, n);
  else
    res = dfs(cur + A[cur], 1, n);
  if (res != -1) dp[cur][d] = res + A[cur];
  return dp[cur][d];
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%I64d", &A[i]);
  dp[1][1] = dp[1][0] = -1;
  for (int i = 2; i <= n; i++) {
    long long t = dfs(i, 1, n);
    if (t != -1) t += i - 1;
    printf("%I64d\n", t);
  }
  return 0;
}
