#include <bits/stdc++.h>
using namespace std;
long long a[2 * 100100], dp[2 * 100100][2], vis[2 * 100100][2], n, i;
long long y;
long long dfs(int x, int t) {
  long long y;
  if (x <= 0 || x > n) return 0;
  if (vis[x][t] == i) return -1;
  vis[x][t] = i;
  if (dp[x][t] != -2) return dp[x][t];
  t == 0 ? y = dfs(x + a[x], 1) : y = dfs(x - a[x], 0);
  if (y == -1)
    return dp[x][t] = -1;
  else
    return dp[x][t] = y + a[x];
}
int main() {
  scanf("%I64d", &n);
  for (i = 2; i <= n; i++) scanf("%I64d", &a[i]);
  for (i = 0; i < 2 * 100100; i++) {
    dp[i][0] = dp[i][1] = -2;
    vis[i][0] = vis[i][1] = 0;
  }
  for (i = 1; i < n; i++) {
    dp[1][0] = -2;
    a[1] = i;
    printf("%I64d\n", dfs(1, 0));
  }
}
