#include <bits/stdc++.h>
const int N = 200005;
using namespace std;
int a[N], n;
long long dp[N];
long long solve(int x) {
  if (dp[x] != -1) return dp[x];
  int cur = x;
  dp[cur] = -2;
  long long res = 0;
  res += a[x];
  x -= a[x];
  if (x <= 0) {
    dp[cur] = res;
    return dp[cur];
  }
  if (x == 1) {
    dp[cur] = -2;
    return dp[cur];
  }
  res += a[x];
  x += a[x];
  if (x > n) {
    dp[cur] = res;
    return dp[cur];
  }
  if (x == 1) {
    dp[cur] = -2;
    return dp[cur];
  }
  long long answer = solve(x);
  if (answer == -2) {
    dp[cur] = -2;
    return dp[cur];
  }
  dp[cur] = answer + res;
  return dp[cur];
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i < n; ++i) {
    long long ans = solve(1 + i);
    if (ans == -2)
      puts("-1");
    else
      printf("%I64d\n", ans + i);
  }
  return 0;
}
