package yuki_coder; import java.util.Scanner; public class No_311 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long ans = 0; for(int i = 1; i <= N; i++){ if(i%15==0){ ans += 4; }else if(i%3==0){ ans += 2; }else if(i%5==0){ ans += 2; } } System.out.println(ans); } }