#include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int N, z_cnt = 0; cin >> N; for(int i = 1; i <= N; i++){ if(i % 15 == 0) z_cnt += 4; else if(i % 3 == 0 || i % 5 == 0) z_cnt += 2; } cout << z_cnt << '\n'; }