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