#include using namespace std; typedef long long ll; int main() { ll N; cin >> N; ll n3 = N / 3, n5 = N / 5; cout << (n3+n5)*2 << endl; }