#include <bits/stdc++.h>
using namespace std;
double PI = 3.141592653589793;
const double EPS = 1e-8;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
const int oo = 1e9;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int n;
long long t[N];
long long dp[N][2];
int vis[N][2];
long long calc(int i, int add) {
  if (i <= 0 || i > n) return 0;
  if (vis[i][add] == 1) return dp[i][add] = -1e17;
  long long &ret = dp[i][add];
  if (vis[i][add]) return ret;
  vis[i][add] = 1;
  if (add)
    ret = t[i] + calc(i + t[i], 0);
  else
    ret = t[i] + calc(i - t[i], 1);
  vis[i][add] = 2;
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%lld", &t[i]);
  for (int i = 1; i <= n - 1; i++) {
    t[1] = i;
    long long y = i;
    y += calc(i + 1, 0);
    printf("%lld\n", (y < -1e15 ? -1 : y));
  }
}
