#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int cnt = 0; for (int i = 1; i <= 14000; i++) { if (i % 7 == 0) { N += 6; } cnt++; if (N == cnt) { cout << i << '\n'; return 0; } } return 0; }