#include<bits/stdc++.h>
using namespace std;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int X;
  cin>>X;
  int d[7]={1,1,0,0,1,0,0},p[2]={-1,2};
  int ans=0,t=0;
  for(int i=0;i<100;i++){
    for(int j=0;j<7;j++){
      t+=p[d[j]];
      ans+=abs(p[d[j]]);
      if(t==X){
        cout<<ans<<'\n';
        return 0;
      }
    }
  }

}