#include using namespace std; int main(){ int x,y; cin>>x; switch (x%6){ case 1: y=2; break; case 2: y=8; break; case 3: y=5; break; case 4: y=7; break; case 5: y=1; break; case 6: y=4; break; } cout<