#include int main(void){ int N; int i; int counter=0; scanf("%d",&N); for(i=1;i<=N;i++){ if(i%3==0 && i%5==0) counter=counter+4; else if(i%3==0) counter=counter+2; else if(i%5==0) counter=counter+2; } printf("%d",counter); return 0; }