#include using namespace std; int main(int argc, const char* argv[]) { size_t N; cin >> N; size_t cnt = 0; for (size_t i = 1; i <= N; i++) { if (i % 3 == 0) cnt += 2; if (i % 5 == 0) cnt += 2; } cout << cnt << endl; return 0; }