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