#include using namespace std; int main(void){ //input int num; cin >> num; //calc int z=0; for(int i=1;i<=num;i++){ if(i % 3 == 0 && i % 5 == 0){ z += 4; }else if(i % 3 == 0 || i % 5 == 0){ z += 2; } } //output cout << z; }