#include unsigned long long int n,i,c; int main() { scanf("%ld",&n); for(i=3;i<=n;i+=2){ if(i%3==0&&i%5==0){ c+=4; }else if(i%5==0){ c+=2; }else if(i%3==0){ c+=2; } } printf("%ld",c); return 0; }