//打表找规律 #include <iostream> using namespace std; int n; int main() { cin>>n; if(n==1) cout<<0; else if(n==2) cout<<2; else if(n==3) cout<<4; else { if(n%2==0) cout<<4; else cout<<6; } }