#include using namespace std; using LL = long long; int main() { LL N; cin >> N; LL ans = 0L; for (LL i = 1L; i <= N; ++i) { if (i % 3 == 0) { ans += 2; } if(i % 5 == 0) { ans += 2; } } cout << ans << endl; }