#include using namespace std; int main(){ int X; cin >> X; int dx[7] = {2, 2, -1, -1, 2, -1, -1}; int ans = 0, cx = 0; while(true){ for(int i = 0; i < 7; i++){ cx += dx[i]; ans += abs(dx[i]); if(cx == X){ cout << ans; return 0; } } } }