#include<bits/stdc++.h>
using namespace std;
int ans;
int main()
{
int n; cin >> n;
int temp1 = n / 6;
int temp2 = n % 6;
ans = ans+(temp1*3); //有多少个6就有多少个3天
if (temp2 >= 1 && temp2 <= 2)ans+=1; //剩1就只能再用1天
else if (temp2 >= 3)ans+=2; //剩的能量石大于3个,还能用两天
cout << ans << endl;
return 0;
}