import java.util.Scanner; class FizzBuzzString { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int z = 0; for ( int i = 0; i < n; i++ ) { if ( i % 3 == 0 && i % 5 == 0 ) { z += 4; } else { if ( i % 3 == 0 ) { z += 2; } if ( i % 5 == 0 ) { z += 2; } } } System.out.println(z); } }