#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int now = 0;
  int count = 0;
  int c=0;
  int N;
  cin>>N;
  while(now != N){
      if(c%7 == 0 || c%7 == 1 || c%7 == 4){
          count+=2;
          now += 2;
      } 
      else{
          now--;
          count++;
      }c++;
  }
  cout<<count<<endl;
}