#include using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define INF32 2147483647 #define ALL(x) x.begin(), x.end() vector ddx = {0, 1, 0, -1, 1, 1, -1, -1}; vector ddy = {1, 0, -1, 0, 1, -1, -1, 1}; int main() { int n;cin>>n; int day = 1; while(n != 0){ if(day % 7 == 0){ n += 6; } n--; day++; } cout<< day - 1 <