#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
cout << (a < 0? a: a + 2) << " ";
}
return 0;
}
ICAgICNpbmNsdWRlIDxpb3N0cmVhbT4KICAgICAgICAgICAgdXNpbmcgbmFtZXNwYWNlIHN0ZDsKICAgICAKICAgICAgICAgICAgaW50IG1haW4oKSB7CiAgICAgICAgICAgIAlpbnQgbjsgCiAgICAgICAgICAgIAljaW4gPj4gbjsKICAgICAgICAgICAgCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIAkJaW50IGE7CiAgICAgICAgICAgIAkJY2luID4+IGE7CiAgICAgICAgICAgIAkJY291dCA8PCAoYSA8IDA/IGE6IGEgKyAyKSA8PCAiICI7CiAgICAgICAgICAgIAl9CiAgICByZXR1cm4gMDsKIH0=