#include <bits/stdc++.h>
using namespace std;
static int N, vis[2][200010];
static long long num[200010], dp[2][200010];
long long dfs(int p, int x) {
  if (vis[p][x])
    return dp[p][x];
  else
    vis[p][x] = 1;
  int tar = p ? x - num[x] : x + num[x];
  if (tar <= 0 || tar > N)
    dp[p][x] = num[x];
  else if (dfs(!p, tar) != -1)
    dp[p][x] = dp[!p][tar] + num[x];
  return dp[p][x];
}
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%d", &N);
  vis[0][1] = vis[1][1] = 1;
  dp[1][1] = 0;
  for (int i = 2; i <= N; i++) scanf("%I64d", &num[i]);
  for (int i = 2; i <= N; i++) dfs(1, i);
  for (int i = 2; i <= N; i++)
    if (dp[1][i] != -1) dp[1][i] += i - 1;
  for (int i = 2; i <= N; i++) printf("%I64d\n", dp[1][i]);
  return 0;
}
