#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 2 * (int)(1e5);
int n;
long long a[N_MAX + 1];
long long dp[N_MAX + 1];
bool used[N_MAX + 1];
long long dfs(int i) {
  if (dp[i] != 0) return dp[i];
  if (used[i]) {
    dp[i] = -1;
    return dp[i];
  }
  used[i] = true;
  int j = i - a[i];
  if (j <= 0) {
    dp[i] = a[i];
    return dp[i];
  }
  if (j == 1) {
    dp[i] = -1;
    return dp[i];
  }
  int k = j + a[j];
  if (k > n) {
    dp[i] = a[i] + a[j];
    return dp[i];
  }
  dp[i] = dfs(k);
  if (dp[i] != -1) dp[i] += a[i] + a[j];
  return dp[i];
}
void solve() {
  for (int i = 2; i <= n; ++i) dfs(i);
  for (int i = 1; i < n; ++i) {
    long long ans = i + dp[1 + i];
    if (dp[1 + i] == -1) ans = -1;
    cout << ans << endl;
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < (n - 1); ++i) cin >> a[i + 2];
  solve();
  return 0;
}
