#include <bits/stdc++.h>
using namespace std;


#define int                long long int
#define fi                first
#define se                second
#define pb                push_back
#define rep(i,a,n)        for(int i = a;i < n;i++)
#define vec               vector<int>
#define read(v,n)         rep(i,0,n) {cin>>v[i];}
#define pii               pair<int,int>
#define mpp               make_pair(a,b)
#define write(a,n)        rep(i,0,n) {cout<<a[i]<<" ";}cout<<endl;
#define all(v)            v.begin(),v.end()
#define srt(v)            sort(v.rbegin(),v.rend())
#define scn(a)            cin>>a
#define nl                endl
#define dbug(x)          cout << (#x) << " is " << (x) << endl
#define gcd(a,b)          __gcd(a,b)
#define bitcount(n)       __builtin_popcount(n)
#define IOS               ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mod               1000000007





int ceil(int x, int y)
{
	if (x % y == 0)
		return x / y;
	else
		return x / y + 1;
}
void solve()
{
	int n;
	cin >> n;
	cout << ceil(n, 100) << endl;
}
signed main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t = 1;
	//cin >> t;
	while (t-- > 0)
	{
		solve();
	}
#ifndef ONLINE_JUDGE
	cout << "\nTime Elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n";
#endif

}
#include <bits/stdc++.h>

using namespace std;
int mas[200000];
int main()
{
    vector<int> ans;
    int n;
    cin>>n;
    int n1=n;
    for(int i=0; i<n; i++) cin>>mas[i];
    for(int i=n-1; i>=0; i--){
        if(mas[i]==n1){
            int n2=0;
            for(int j=i+2; j<n1; j++){
                if(mas[j]!=j){
                    cout<<-1;
                    return 0;
                }
                n2++;
            }
            for(int j=i+1; j<n1; j++){
                ans.push_back(j);
            }
            if(n1-i!=1){
                swap(mas[i],mas[i+1]);
            }
            n1=n1-max(1,n2+1);
        }
    }
    if(ans.size()!=n-1){
        cout<<-1;
        return 0;
    }
    for(auto u:ans){
        cout<<u<<"\n";
    }
}
