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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int s;
        cin >> s;
        int k, ans = 0;

        for (k = 1; s > 0 && s >= k; k += 2)
            s -= k, ++ans;
        for (k = min(s, k - 1); s > 0 && k >= 1; k--) {
            ans += s / k;
            s -= (s / k) * k;
        }

        cout << ans << '\n';
    }
    return 0;
}
