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