#include <bits/stdc++.h>
using namespace std;
const long long N = 200001;
long long n, a[N], od[N], ev[N];
bool fod[N], fev[N];
long long odd(long long);
long long even(long long);
long long odd(long long i) {
  if (i < 1) return 0;
  if (fod[i]) {
    if (od[i] <= 0) return od[i] = -i;
    return od[i];
  }
  fod[i] = true;
  return od[i] = a[i] + even(i + a[i]);
}
long long even(long long i) {
  if (i == 1 || i > n) return 0;
  if (fev[i]) {
    if (ev[i] <= 0) return ev[i] = -i;
    return ev[i];
  }
  fev[i] = true;
  long long d = odd(i - a[i]);
  if (d < 0) return ev[i] = -i;
  return ev[i] = a[i] + d;
}
int main() {
  cin >> n;
  for (long long i = 2; i <= n; i++) cin >> a[i];
  fod[1] = true;
  for (long long i = 2; i <= n; i++) even(i);
  for (long long i = 1; i < n; i++) cout << i + ev[1 + i] << endl;
  return 0;
}
