#include <iostream>
using namespace std;
int main() {
int n = 0;
cin >> n;
if (n <= 2) {
cout << -1 << endl;
} else {
if (n % 2 == 0) {
int num3 = n*(n - 1)/2;// 第N行第三个数的值必然符合1+2+3+...+n-1即n*(n-1)/2
if(num3 % 2){
cout << 4 << endl;//第N行第三个数的值为奇数则第四个必为偶数
}else{
cout << 3 << endl;
}
}else{
cout << 2 << endl;//奇数行 第二个数必为偶数
}
}
return 0;
}
// 64 位输出请用 printf("%lld")



京公网安备 11010502036488号