// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input int N; cin >> N; // Simulation int day = 0; while (N != 0) { ++day; if (day % 7 == 0) N += 6; --N; } // Output cout << day << endl; }