#include using namespace std; int n, i; int main() { cin >> n; while (n > 0) { i++; if (i % 7 == 0) n += 6; n--; } cout << i << endl; }