#include <vector>
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <map>
#include <cmath>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;

int main(){
	ll n;
	cin >> n;
	ll ans = 0;
	ans += n / 3;
	ans += n / 5;
	ans *= 2;
	cout << ans << endl;
}