#include <iostream>
using namespace std;
int main()
{
int t;
while(cin >> t){
if(t < 3){
cout << t+2 << endl;
} else {
cout << t << endl;
}
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKCWludCB0OwoJd2hpbGUoY2luID4+IHQpewoJCWlmKHQgPCAzKXsKCQkJY291dCA8PCB0KzIgPDwgZW5kbDsKCQl9IGVsc2UgewoJCQljb3V0IDw8IHQgPDwgZW5kbDsKCQl9Cgl9Cn0=