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