#include using namespace std; int main(void) { int x; cin >> x; int d[7] = { 2,2,-1,-1,2,-1,-1 }; int i = 0, now = 0, ans = 0; while (now != x) { now += d[i]; ans += abs(d[i]); i++; i %= 7; } cout << ans << endl; return 0; }