#include <iostream>
using namespace std;
int main() {
int k, x;
cin >> k;
for (int i = 0; i < k; i++) {
cin >> x;
cout << (x < 0? x: x + 2) << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogICAgIAppbnQgbWFpbigpIHsKICAgIGludCBrLCB4OyAKICAgIGNpbiA+PiBrOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBrOyBpKyspIHsKICAgICAgICBjaW4gPj4geDsKICAgICAgICBjb3V0IDw8ICh4IDwgMD8geDogeCArIDIpIDw8ICIgIjsKICAgIH0KICAgIHJldHVybiAwOwp9