#include<iostream>
#include<iomanip>
#include<algorithm>
#include<math.h>
#include<vector>
using namespace std;

int main() {
	unsigned int n;

	cin >> n;
	vector<unsigned int> a_Data;
	a_Data.push_back(0);
	for (unsigned int i = 1; i < n; i++) 
	{
		int buf;
		cin >> buf;
		a_Data.push_back(buf);
	}

	int ans_Buf = 0;
	for (int i = 0; i < n; i++) 
	{
		int a_buf = 0;
		ans_Buf = 0;
		for (int j = 0; i + j < n; j++)
		{
			if (a_Data[i] + 1 == a_Data[i + j])
				ans_Buf++;
		}
		cout <<ans_Buf << endl;
	}

	return 0;
}