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

int main() {
    LL N;cin>>N;
    cout<<(N/3+N/5)*2<<endl;
    return 0;
}