#include main(){ long int n, x3, x5, ans; scanf("%lld",&n); x3=n/3; x5=n/5; ans=2*x3+2*x5; printf("%lld\n",ans); return 0; }