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

int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int t;
    cin>>t;
    while (t--)
    {
        int n;
        cin>>n;
        if (n<=10)
        {
          cout<<n;
        }
    else {cout<<n-1;}
    }
}