#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
long long int aa[N];
long long int dp[N][21][2];
long long int cost[N][21][2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> aa[i];
  for (int pw = 0; pw < 21; pw++) dp[1][pw][0] = dp[1][pw][1] = 1;
  for (int i = 2; i <= n; i++) {
    dp[i][0][0] = max(0LL, i - aa[i]);
    cost[i][0][0] = aa[i];
    dp[i][0][1] = min(n + 1, i + aa[i]);
    cost[i][0][1] = aa[i];
  }
  for (int i = 2; i <= n; i++) {
    int pr0 = dp[i][0][0];
    dp[i][1][0] = dp[pr0][0][1];
    cost[i][1][0] = aa[i] + aa[pr0];
    int pr1 = dp[i][0][1];
    dp[i][1][1] = dp[pr1][0][0];
    cost[i][1][1] = aa[i] + aa[pr1];
  }
  for (int pw = 2; pw < 21; pw++) {
    for (int i = 2; i <= n; i++) {
      int pr0 = dp[i][pw - 1][0];
      dp[i][pw][0] = dp[pr0][pw - 1][0];
      cost[i][pw][0] = cost[pr0][pw - 1][0] + cost[i][pw - 1][0];
      int pr1 = dp[i][pw - 1][1];
      dp[i][pw][1] = dp[pr1][pw - 1][1];
      cost[i][pw][1] = cost[pr1][pw - 1][1] + cost[i][pw - 1][1];
    }
  }
  for (int i = 1; i < n; i++) {
    int xx = 1 + i;
    if (aa[xx] == xx - 1) {
      cout << "-1\n";
      continue;
    }
    if (dp[xx][20][0] != 0 && dp[xx][20][0] != n + 1) {
      cout << "-1\n";
      continue;
    }
    long long int yy = 0;
    for (int pw = 19; pw >= 3; pw--) {
      if (dp[xx][pw][0] != 0 && dp[xx][pw][0] != n + 1) {
        yy += cost[xx][pw][0];
        xx = dp[xx][pw][0];
      }
    }
    while (xx > 0 && xx <= n) {
      yy += aa[xx];
      xx -= aa[xx];
      if (xx <= 0) break;
      yy += aa[xx];
      xx += aa[xx];
    }
    cout << yy + i << "\n";
  }
  return 0;
}
