#include <type_traits>
#include <vector>
#include <iostream>

constexpr auto MAX = 100000000 ; // 10^8
using int_type = std::remove_const< decltype(MAX) >::type ;

std::vector<int_type> prime_numbers()
{
    const int_type SZ = MAX / 2 + 1 ;
    std::vector<bool> sieve( SZ, true ) ;
    for( int_type i = 2 ; i < SZ ; ++i ) if( sieve[i] )
       for( int_type j = i+i ; j < SZ ; j += i ) sieve[j] = false ;

    std::vector<int_type> result ;
    for( int_type i = 2 ; i < SZ ; ++i ) if( sieve[i] ) result.push_back(i) ;
    return result ;
}

int main()
{
    auto primes = prime_numbers() ;

    int_type count = 0 ;

    for( auto p : primes )
    {
        for( auto p2 : primes )
        {
            if( p*p2 > MAX ) break ;
            if( p2 >= p ) ++count ;
        }
    }

    std::cout << count << '\n' ; // 17427258
}
