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

int main(){
   int n;
   int a = 1;
   while(cin>>n){
      if(n <= 2*a){
         cout << 2*n << endl;
      }else if(n <= 4*a){
         cout << 2*n + a << endl;
      }else if(n <= 6*a){
         cout << 2*n + 2*a << endl;
      }else{
         cout << 2*n + 4*a << endl;
      }
   }
   return 0;
}
