A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input contains one integer number n (1 ≤ n ≤ 3000).

Output the amount of almost prime numbers between 1 and n, inclusive.

uses math;
type mass=array[0..3000] of integer;
var d,n,sum,res,p,kol,q,l1,x,y,r1,q1,q2,k,uk,min1,e,e1,kolv,r,l,b,c,max1:int64;s,s1,s2,s3:string;i:integer;
   m:mass;ch,ww:char;u:boolean;qq,w,g,a:int64;v,j,z:integer;
begin
//  assign(input,'input.txt');
//  assign(output,'output.txt');
  readln(n);
  a:=1;
  m[1]:=2;
  for i:=3 to n do
      Begin
         u:=true;
         for z:=2 to i-1 do
            if i mod z=0
            then Begin
                    u:=false;
                    break;
                 end;
         if u
         then Begin
                 inc(a);
                 m[a]:=i;
              end;
      end;
  b:=0;
  for i:=6 to n do
    Begin
       c:=i;
       z:=1;
       k:=0;
       while c>1 do
          Begin
            while (z<=a) and (c mod m[z]>0) do
               inc(z);
            if z>a
            then break;
            while (c>1) and (c mod m[z]=0) do
               c:=c div m[z];
            inc(k);
            if k>2
            then break;
          end;
       if k=2
       then inc(b);
    end;
  writeln(b);
end.

var n, res, index: longint;
function CHECK_SIMPLE(almost_simple: longint): boolean;
var i,kol_d,middle: longint;
        begin
        middle:=(almost_simple div 2)+1;
        i:=1; kol_d:=0;
        while ((i <= middle) and (kol_d < 3)) do
                begin
                inc(i);
                if almost_simple mod i=0 then
                        begin
                                while almost_simple mod i=0 do
                                        almost_simple:=almost_simple div i;
                                inc(kol_d);
                        end;
                end;
        if kol_d=2 then CHECK_SIMPLE:=TRUE
                else CHECK_SIMPLE:=FALSE;
        end;
begin
        res:=0;
        read(n);
        for index:=6 to n do if CHECK_SIMPLE(index) then inc(res);
        write(res);
end.

var k,i,j,q,p,ans,n:longint;
b:boolean;
s:array [1..2500] of longint;
begin
read(n);

p:=1;
s[p]:=2;
q:=(n div 2) +1;

for i:=3 to q do begin
b:=false;
for j:=1 to p do
if i mod s[j]=0 then begin
b:=true;
break;
end;
if not b then begin
inc(p);
s[p]:=i
end;
end;

ans:=0;
for i:=1 to n do     begin
k:=0;
for j:=1 to p do  begin
if i mod s[j]=0 then inc(k);
if k>2 then break;
end;
if k=2 then inc(ans);
end;
write(ans);
end.

var
 i,j,n,m,k,t,x:longint;
 f:array[0..5555]of boolean;
begin
 readln(n);
 for i:=2 to 5000 do if not f[i] then
 begin
  j:=i*i;
  while j<=5000 do
  begin
   f[j]:=true;
   inc(j,i);
  end;
 end;
 for i:=2 to n do
 begin
  k:=0;
  for j:=2 to i do if(i mod j=0)and(not f[j])then inc(k);
  if k=2 then inc(x);
 end;
 writeln(x);
end.

var
 a:array[0..3001] of longint;
 i,j,n,m,k,i1,x:longint;
 b:boolean;
begin
readln(n);
m:=0;
for i:=2 to n do
 begin
  b:=true;
  for j:=2 to trunc(sqrt(i)) do
   if i mod j=0 then
    begin
     b:=false;
     break;
    end;
  if b then
   begin
    inc(m);
    a[m]:=i;
   end;
 end;
k:=0;
for i1:=6 to n do
for i:=1 to m do
 if i1 mod a[i]=0 then
 begin
 x:=i1;
 while x mod a[i]=0 do x:=x div a[i];
 for j:=1 to m do
  if x mod a[j]=0 then
  begin
   while x mod a[j]=0 do x:=x div a[j];
   if x=1 then inc(k);
   break;
  end;
  break;
 end;
write(k);
end.

var n,i,j,k,x:integer;
function prime(y:integer):boolean;
var ans:boolean;
    i:integer;
begin
    ans:=true;
    for i:=2 to trunc(sqrt(y)) do
        if y mod i=0 then begin
            ans:=false;
            break;
        end;
    if y=2 then
        prime:=true
    else
        prime:=ans;
end;
begin
    readln(n);
    x:=0;
    for i:=2 to n do begin
        k:=0;
        for j:=2 to (i div 2) do
            if prime(j)and(i mod j=0) then
                inc(k);
        if k=2 then
            inc(x);
    end;
    writeln(x);
    readln;
end.

var             n,d,i:longint;
function        nt(a:longint):boolean;
var             j:longint;
begin
        if a=1 then exit(false);
        for j:=2 to trunc(sqrt(a)) do
                if a mod j=0 then exit(false);
        exit(true);
end;
{------------------------------------------------------------------}
function        kt(s:longint):boolean;
var             dem,k:longint;
begin
        dem:=0;
        for k:=1 to s-1 do
                if (s mod k=0) and (nt(k)=true) then dem:=dem+1;
        if dem=2 then exit(true)
        else exit(false);
end;
BEGIN
        readln(n);
        d:=0;
        for i:=1 to n do
                if kt(i)=true then d:=d+1;
        writeln(d);
END.

program a26;
var k,d,n,kol,i,j,p,t:integer;
     b:array[1..3000] of integer;
begin
read(n);
    kol:=0;
    if n<6 then begin write(kol);exit; end;
    for i:=6 to n do
    begin
       k:=1;d:=2;t:=i;
       while t>1 do
       begin
         if t mod d=0 then begin b[k]:=d;k:=k+1;t:=t div d; end
                      else begin
                               if d=2 then d:=d+1
                                      else d:=d+2;
                           end;

       end;
       p:=0;
       for j:=1 to k-2 do
         begin
           if b[j]<>b[j+1] then p:=p+1;
         end;
        if p=1 then kol:=kol+1;
    end;
     write(kol);
end.

program Project_a;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  kol, n, i: integer;

function simple(x: integer): boolean;
var
  i: integer;
begin
  simple := true;
  for i := 2 to x - 1 do
    if x mod i = 0 then begin
      simple := false;
      exit;
    end;
end;

function almostsimple(x: integer): boolean;
var
  i, kol: integer;
begin
  kol := 0;
  for i := 2 to x do
    if (x mod i = 0) and (simple(i)) then
      inc(kol);
  if kol <> 2 then
    almostsimple := false
  else
    almostsimple := true;
end;
begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(n);
  kol := 0;
  for i := 1 to n do
    if almostsimple(i) then
      inc(kol);
  write(kol);
end.

program sieve_of_eratosthenes;
const max=46348;               //max input. lebih dari ini runtime error 215
var n,i,j,k,l,count,counter:longint;
prime:array[2..max] of boolean;

begin
for k:=2 to 3000 do prime[k]:=true;
i:=2;
while i<=3000 do
        begin
        if prime[i] then
                begin
                j:=i;
                while i*j<=3000 do
                        begin
                        prime[i*j]:=false;
                        inc(j);
                        end;
                end;
        inc(i);
        end;
readln(n);
for l:=2 to n do
        begin
        count:=0;
        for k:=2 to n do if (prime[k] and (l mod k =0)) then inc(count);
        if count=2 then inc(counter);
        end;
writeln(counter);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
Var
  n,i,j,ind, ind2:integer;
  a:array[1..3014] of integer;
begin
  readln(n);
  ind:=0;
  ind2:=1;
  for i:= 2 to 27600 do
    begin
      for j:=2 to i-1 do
        begin
          if i mod j=0 then
            ind:=1;
        end;
      if ind=1 then
        begin
          ind:=0;
        end
      else
        begin
          ind:=0;
          a[ind2]:=i;
          ind2:=ind2+1;
        end;
    end;

  ind:=0;
  ind2:=0;
  for j:=3 to n do
    begin
      for i:= 1 to n div 2 do
        begin
          if j mod a[i]=0 then
          ind:=ind+1;
        end;
      if ind=2 then
        begin
          ind2:=ind2+1;
        end;
      ind:=0;
    end;
  writeln(ind2);
  readln;
end.

var
   i,j,k,l,m,n : longint;
   a : array [0..3000] of integer;
begin
  read(n); m:=0;
  for i:=1 to n div 2  do
    begin
      k:=0;
      for j:=1 to i do if i mod j=0 then inc(k);
      if k=2 then
        begin
          inc(m);
          a[m]:=i;
        end;
    end;
  k:=0;
  for i:=2 to n do
    begin
      l:=0;
      for j:=1 to m do
        if a[j]>=i then break else
        if i mod a[j]=0 then inc(l);
      if l=2 then inc(k);
    end;

  write(k);
end.

var
 n,i,j,k,s:longint;
 a,b:array[0..3000] of longint;
 f:boolean;
begin
 readln(n);
 k:=0;
 for i:=2 to n div 2 do
 begin
   f:=false;
   for j:=1 to k do
   if i mod a[j]=0 then begin f:=true; break; end;
   if not f then begin
                 inc(k);
                 a[k]:=i;
                 for j:=1 to n do
                 if j mod i=0 then inc(b[j]);
                 end;
                 end;
 for i:=1 to n do
 if b[i]=2 then inc(s);
 writeln(s);
 end.

{$apptype console}
{$O-}

var
    c, i, j, n, ans: integer;

function simple(x: integer): boolean;
var i: integer;
begin
    simple := false;
    for i := 2 to x - 1 do
      if x mod i = 0 then
        exit;
    simple := true;
end;

begin
    //reset(input, 'input.txt');
    //rewrite(output, 'output.txt');
    ans := 0;
    read(n);
    for i := 1 to n do begin
      c := 0;
      for j := 2 to i do
        if (i mod j = 0) and (simple(j)) then
          inc(c);
      if c = 2 then inc(ans);
    end;
    write(ans);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a:array[0..3001] of longint;
  i,j,n,m,k,ans:longint;

function is_prime(n:longint):boolean;
var
  i:longint;
begin
  for i:=2 to trunc(sqrt(n)) do
    if n mod i = 0 then
      begin
        is_prime:=false;
        exit;
      end;
  is_prime:=true;
end;

begin
  read(n);
  ans:=0;
  for i:=2 to n do
    for j:=2 to trunc(sqrt(i)) do
      begin
        if (i mod j = 0) then
          if (is_prime(j)) then
            inc(a[i]);
        if (i mod j = 0) and (sqr(j) <> i) and (i div j > 1) then
          if (is_prime(i div j)) then
            inc(a[i]);
      end;
  for i:=1 to n do
    if a[i]=2 then
      inc(ans);
  writeln(ans);
end.

var n , res , i : longint;
function prime(x : longint) : boolean;
var j : longint;
 begin
   prime := true;
   for j := 2 to round(sqrt(x)) do
     if (x mod j = 0) then prime := false;
 end;
Function can(x : longint) : boolean;
var j , cnt : longint;
 begin
   cnt := 0;
   for j := 2 to round(sqrt(x)) do
     if (x mod j = 0)  then begin
       if prime(j) then cnt := cnt + 1;
       if (j <> x div j) and (prime(x div j)) then cnt := cnt + 1;
     end;
   if cnt = 2 then can := true else can := false;
end;
begin
  read(n);
  res := 0;
  for i := 2 to n do
    if (can(i)) then res := res + 1;
  writeln(res);
end.

program t1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a:array[1..100000] of longint;
  n,i,j,k,g,r:longint;

  function prim(x:longint):boolean;
    var
      i:longint;
    begin
      prim:=true;
      for i:=2 to trunc(sqrt(x)) do
        if x mod i=0 then begin prim:=false; exit; end;
    end;

begin
  read(n);
  r:=0;
  k:=0;
  for i:=2 to n do
    if prim(i) then begin inc(k); a[k]:=i; end;
  for i:=1 to n do
    begin
      g:=0;
      for j:=1 to k do
        if i mod a[j]=0 then inc(g);
      if g=2 then inc(r);
    end;
  writeln(r);
end.

Var n,k,kil,i,j,l:longint;
f:boolean;

function prost(a:longint):boolean;
begin
l:=2;
f:=true;
while (l<=sqrt(a)) and f do
if a mod l=0 then f:=false else l:=l+1;
if a=1 then f:=false;
prost:=f;
end;

begin
readln(n);
for i:=6 to n do begin
k:=0;

for j:=1 to i do
if (i mod j=0) and (prost(j)) then k:=k+1;
if k=2 then kil:=kil+1;
end;
writeln(kil);
end.

var i,j,dem,m,tam:longint;
Function NT(k:longint):boolean;
Var i:longint;
begin
if k=1 then exit(false);
for i:=2 to trunc(sqrt(k)) do
if k mod i = 0 then exit(false);
exit(true);
end;
Begin
readln(m);tam:=0;
FOR i:=2 to m do
begin   dem:=0;
        for j:=2 to i do
                 begin
                        if ((i mod j =0) and (NT(j))) then inc(dem);
                        if dem>2 then break;
                  end;
                        if dem=2 then inc(tam);
end;
writeln(tam);
End.

//tt1
const fi = 'almostprime.inp';
      fo = 'almostprime.out';

var n,i,dem,j,res : integer;

function ktnt(n:integer) : boolean;
var i : integer;
begin
  if n = 1 then exit(false);
  if n < 4 then exit(true);
  for i := 2 to trunc(sqrt(n)) do
    if n mod i = 0 then exit(false);
  exit(true);
end;

BEGIN
  //assign(input,fi); reset(input);
  //assign(output,fo); rewrite(output);
  read(n); res := 0;
  for i := 6 to n do
    begin
      dem := 0;
      for j := 2 to i do
        if (i mod j = 0) and (ktnt(j)) then inc(dem);
      if dem = 2 then inc(res);
    end;
  write(res);
  //close(input); close(output);
END.

var
        a : array[1..2000] of longint;
        nt : array[1..3000] of boolean;
        n , m , kq : longint;
procedure sang( x : longint );
var
        i , j : longint;
begin
        fillchar( nt , sizeof( nt ) , true );
        nt[ 1 ] := false;
        for i := 2 to trunc( sqrt( n ) ) do
        begin
                j := i * i;
                while j <= n do
                begin
                        nt[ j ] := false;
                        j := j + i;
                end;
        end;
        m := 0;
        for i := 2 to n do
                if nt[ i ] then
                begin
                        inc( m );
                        a[ m ] := i;
                end;
        a[ m + 1 ] := maxlongint;
end;
procedure xuli;
var
        i , j , dem : longint;
begin
        read( n );
        sang( n );
        kq := 0;
        for i := 6 to n do
                if nt[ i ] = false then
                begin
                        j := 1;
                        dem := 0;
                        while a[ j ] <= i do
                        begin
                                if i mod a[ j ] = 0 then inc( dem );
                                inc( j );
                                if dem > 2 then break;
                        end;
                        if dem = 2 then inc( kq );
                end;
        write( kq );
end;
begin
        xuli;
end.

{$O-}
program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  res, cur, i, j, n: integer;
  b: array[1..3000] of boolean;

function isPrime(i: integer): boolean;
var
  j: integer;
begin
  j := 2;
  while (j * j <= i) do begin
    if i mod j = 0 then begin
      result := false;
      exit;
    end;
    inc(j);
  end;
  result := true;
end;

begin
 // reset(input, 'input.txt');
 // rewrite(output, 'output.txt');
  read(n);
  for i := 2 to n do begin
    b[i] := isPrime(i);
  end;
  for i := 2 to n do begin
    j := 2;
    cur := 0;
    while (j * j <= i) do begin
      if i mod j = 0 then begin
        if b[i div j] then begin
          inc(cur);
        end;
        if b[j] and (i div j <> j) then begin
          inc(cur);
        end;
      end;
      inc(j);
    end;
    if cur = 2 then begin
      inc(res);
    end;
  end;
  writeln(res);
end.

const finp='';
      fout='';
      maxn=3001;
var a:array[0..maxn] of integer;
    n:integer;
procedure nhap;
var f:text;
begin
    assign(f,finp);
    reset(f);
    readln(f,n);
    close(f);
end;
function PTTSNT(x:integer):boolean;
var i,m,dem:integer;
begin
    dem:=0; PTTSNT:=true; m:=x;
    for i:=2 to trunc(sqrt(m)) do
        if x mod i=0 then
        begin
            inc(dem);
            while x mod i=0 do x:=x div i;
        end;
    if x>1 then inc(dem);
    if dem<>2 then exit(false);
end;
function KQ:integer;
var i:integer;
    dem:integer;
begin
    dem:=0;
    for i:=6 to n do
        if PTTSNT(i) then inc(dem);
    KQ:=dem;
end;
procedure Xuat;
var f:text;
begin
    assign(f,fout);
    rewrite(f);
    writeln(f,KQ);
    close(f);
end;
begin
    nhap;
    xuat;
end.

var s,i,j,n:longint;
f:array[0..6000]of longint;

begin
readln(n);
for i:=2 to n do
  if f[i]=0 then
  for j:=2 to n div i do f[i*j]:=f[i*j]+1;
for i:=1 to n do
  if f[i]=2then s:=s+1;
writeln(s);
end.

var
   n,i,j,a,rez,k:Integer;
begin
read(n);
for i:=6 to n do
 begin
   k:=i; a:=0;
   for j:=2 to i div 2 +1 do
    begin
     while k mod j = 0 do
      begin
        k:=k div j;
        if k mod j <> 0 then Inc(a);
      end;
    end;
   if a=2 then inc(rez);
 end;
Write(rez);
end.

Var t, n, res : integer;

Function Check(x : integer) : boolean;
Var i, count : integer;
Begin
    i := 1;
    count := 0;
    Repeat
        Repeat inc(i) Until x mod i = 0;
        inc(count);
        If count > 2 then break;
        Repeat x := x div i Until (x = 0) or (x mod i <> 0);
    Until x = 1;
    If count = 2 then Check := true else Check := false;
End;

BEGIN
    readln(n);
    res := 0;
    For t := 2 to n do
        If Check(t) then inc(res);
    writeln(res);
END.

var n,i,j,a,r,k:word;
begin
  read(n);
  for i:=6to n do
    begin
      k:=i;
      a:=0;
      for j:=2to i div 2+1do
        while k mod j=0do
          begin
            k:=k div j;
            if k mod j<>0then inc(a)
          end;
      if a=2then inc(r)
    end;
  write(r);
end.

program codeforces;

{$APPTYPE CONSOLE}
{$R+ Q+ I+}

uses
  SysUtils;

var
  i,n,j,ans,t: integer;
  p: array[1..3000]of integer;
begin
  read(n);
  for i:=2 to n do begin
    if p[i]=0 then Begin
      for j:=1 to n do begin
        if i*j>n then break;
        if p[i*j]=0 then p[i*j]:=i;
      end;
    end;
  end;
  t:=0;
  for i:=1 to n do begin
    ans:=0;
    for j:=1 to i do
       if (i mod j=0) and (p[j]=j) then inc(ans);
    if ans=2 then inc(t);
  end;
  write(t);
end.

var n,i,j,m,tg:word; a:array[2..3000] of boolean;
begin
        read(n);
        fillchar(a,(n-1)*sizeof(boolean),true);
        for i:=2 to n shr 1 do
        if a[i] then
        for j:=2 to n div i do a[i*j]:=false;
        m:=0;
        for i:=6 to n do
        if not a[i] then
        begin
                tg:=i; j:=1;
                repeat inc(j)
                until a[j] and (tg mod j=0);
                repeat tg:=tg div j
                until tg mod j>0;
                if tg>1 then
                begin
                        repeat inc(j)
                        until a[j] and (tg mod j=0);
                        repeat tg:=tg div j
                        until tg mod j>0;
                        if tg=1 then inc(m)
                end
        end;
        write(m)
end.

 var i,n,k,z,kol,j:longint;
begin
 readln(n);
 k:=0;
 for i:=6 to n do begin
   z:=i;
   kol:=0;
   for j:=2 to (i-1) do
     if z mod j = 0 then begin
       inc(kol);
       while z mod j = 0 do
         z:=z div j;
       if kol>2 then break;
       if z=1 then break;
     end;
   if kol=2 then
     inc(k);
 end;
 writeln(k);
end.

program Project26A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, x, i, j, k: Integer;

function prostoe(n: Integer): Boolean;

var
  i: Integer;

begin
  Result := True;
  for i := 2 to n - 1 do begin
    if n mod i = 0 then Result := False;
  end;
end;

begin
  k := 0;
  Readln(n);
  for i := 2 to n do begin
    x := 0;
    for j := 2 to i do begin
      if (i mod j = 0) and (prostoe(j)) then
      Inc(x);
    end;
    if x = 2 then
      Inc(k);
  end;
  Writeln(k);
  readln;
  readln;
end.

Var n,i,dd:Integer;

Function NT(x:Integer):Boolean;
Var j:Integer;
Begin
NT:=True;
If x<=1 then
  Begin
    NT:=False;
    Exit;
  End;
For j:=2 to Trunc(Sqrt(x)) do
  If x Mod j=0 then
    Begin
      NT:=False;
      Exit;
    End;
End;

Procedure Solve(x:Integer);
Var j,d:Integer;
Begin
d:=0;
For j:=2 to Trunc(Sqrt(x)) do
  If x Mod j=0 then
    Begin
      If NT(j) then Inc(d);
      If (j<> x Div j) And NT(x Div j) then Inc(d);
    End;
If d=2 then Inc(dd);
End;

BEGIN
Readln(n);
dd:=0;
For i:=1 to n do Solve(i);
Writeln(dd);
END.

program _26A;
var
  a : array[1..3000] of longint;
  n, i, j : longint;
begin
  read(n);
  a[1] := 1;
  for i := 2 to n div 2 do
    if a[i] = 0
       then begin
              j := i + i;
              while j <= n do
                begin
                  inc(a[j], 1);
                  inc(j, i);
                end;
            end;
  j := 0;
  for i := 1 to n do
    if a[i] = 2
       then inc(j);
  write(j);
end.

var
   n,i,res:integer;
function check(x:integer):integer;
var
   j,k,count,d:integer;
   a:array[1..3000] of integer;
begin
   fillchar(a,sizeof(a),0);
   k:=2; count:=0; d:=x;
   while x<>1 do
     begin
        if x mod k=0 then
           begin
              inc(a[k]);
              x:=x div k;
           end
        else inc(k);
     end;
   for j:=1 to d-1 do
       if a[j]>0 then inc(count);
   exit(count);
end;
begin
   readln(n);
   for i:=5 to n do
   if check(i)=2 then inc(res);
   writeln(res);
end.

var
  c, f, q, l, n, i, j, s, t, m, k: longint;
  a: array[0..10000] of longint;

procedure solve;
var k: longint;
begin
  k := 1;
  while (a[k] < l) and (a[k] <> 0) do begin
      if l mod a[k] = 0 then  begin
        inc(c);
      end;
      inc(k);
  end;
  if c = 2 then
    inc(s);
end;

begin
  read(n);
    for i := 1 to n do begin
      q := round(sqrt(i));
      for j := 1 to q do
        if i mod j = 0 then
          inc(c);
      if (c = 1) and (i <> 1) then begin
        inc(t);
        a[t] := i;
      end;
      c := 0;
    end;
      for l := 1 to n do begin
        solve;
        c := 0;
      end;
  write(s);
end.

var a:array [0..1000] of int64;
    i,j,n,m,h,ans,x,y,k:longint;
    s:string;
    t:real;
  begin

   readln(n);

   for i:=1 to n do
    begin
     x:=1;
     y:=i;
     for j:=2 to i-1 do
      if y mod j =0 then begin while (y mod j=0) do y:=y div j; inc(x); end;
     if x=3 then inc(ans);
    end;
   writeln(ans);
  end.

var
  n:longint;
  a:array [1..3000] of boolean;
  b:array [1..3000] of longint;
  i,j,ans,c,f:longint;

begin
  readln(n);
  fillchar(a,sizeof(a),true);
  a[1]:=false;
  for i:=1 to trunc(sqrt(n)) do
  begin
    j:=i+i;
    if a[i]=true then
    begin
      while j<=n do
      begin
        a[j]:=false;
        inc(j,i);
      end;
    end;
  end;
  c:=0;
  for i:=1 to n do
  begin
    if a[i] then
    begin
      inc(c);
      b[c]:=i;
    end;
  end;
  ans:=0;
  for i:=1 to n do
  begin
    f:=0;
    for j:=1 to c do
      if i mod b[j] = 0 then inc(f);
    if f=2 then inc(ans);
  end;
  writeln(ans);
end.

program a26;
var k,d,n,kol,i,j,p,t:integer;
     b:array[1..3000] of integer;
begin
read(n);
    kol:=0;
    if n<6 then begin write(kol);exit; end;
    for i:=6 to n do
    begin
       k:=1;d:=2;t:=i;
       while t>1 do
       begin
         if t mod d=0 then begin b[k]:=d;k:=k+1;t:=t div d; end
                      else begin
                               if d=2 then d:=d+1
                                      else d:=d+2;
                           end;

       end;
       p:=0;
       for j:=1 to k-2 do
         begin
           if b[j]<>b[j+1] then p:=p+1;
         end;
        if p=1 then kol:=kol+1;
    end;
     write(kol);
end.

{CF26A}
var
n,i,s:longint;
function isp(n:longint):boolean;
 var
 i:longint;
 begin
 for i:=2 to trunc(sqrt(n)) do
  if n mod i=0 then
  exit(false);
 exit(true);
 end;
function num(n:longint):longint;
 var
 i,x:longint;
 begin
 x:=0;
 for i:=2 to n do
  if (n mod i=0) and isp(i) then
  inc(x);
 num:=x;
 end;
begin
read(n);
s:=0;
for i:=6 to n do
 if num(i)=2 then
 inc(s);
writeln(s);
end.

var i,j,s,n,s1,t:integer;
a:array[1..3000] of integer;
begin
read(n);
for i:=2 to 3000 do
for j:=1 to i do
if (i mod j)=0 then inc(a[i]);
t:=1;
for i:=1 to 3000 do
if a[i]=2 then begin a[t]:=i; inc(t); end;
for i:=2 to n do begin
t:=1;
s:=0;
while (s<3)and(a[t]<i) do begin
if ((i mod a[t])=0) then inc(s);
inc(t);
end;
if s=2 then inc(s1);
end;
writeln(s1);
end.

var
n,j,i,kil,p,k,l,oz:longint;

function pros(a:longint):longint;
begin
i:=2; oz:=1;

while (i<= sqrt(a)) and (oz=1) do
if a mod i=0 then oz:=0 else i:=i+1;
if (oz=1) and (i<>1) then pros:=1 else pros:=0;
end;

begin
readln(n);
kil:=0;
for j:=1 to n do
begin
k:=0; p:=0;
for l:=2 to j-1  do
if j mod l=0 then
             begin

             if pros(l)=1 then p:=p+1;
             if p>2 then break;
             end;

 if p=2 then kil:=kil+1;
 end;

 writeln(kil);
 end.

function simple(a:longint):boolean;
var
p:boolean;
i,t:longint;
begin

t:=trunc(sqrt(a))+1;
p:=true;
for i:=2 to t do
        if a mod i=0 then
        begin
        p:=false;
        break;
        end;
if (a=2)  then p:=true;
simple:=p;

end;

var
s:array[1..1000] of longint;
//t,p:array[1..3000] of boolean;

i,j,n,k,num,ndel,del:longint;
t:boolean;
begin
readln(n);
s[1]:=2;
j:=1;

for i:=3 to 3000 do
if (i mod 2=1) then
        if simple(i) then
                begin
                inc(j);
                s[j]:=i;
                end;
        {
  for i:=1 to j-1 do
  for k:=i+1 to j do
        if s[i]*s[k]<=n then
        begin
        inc(num);
        writeln(s[i],' ',s[k]);
        end;
         }
         for k:=1 to n do
         begin
     i:=k;
   j:=1;
   del:=s[j];
   ndel:=0;
   t:=false;
 while i>1 do
        begin
        if i mod del=0 then
                if not t then
                        begin
                        t:=true;
                        inc(ndel);
                        i:=i div del;
                        end
                else i:=i div del
        else
                begin
                inc(j);
                t:=false;
                del:=s[j];
                end;

        end;
   //    writeln('k=',k,'  ndel=',ndel);
       if ndel=2 then inc(num);

        end;
write(num);
 end.

var
  k,s,n,s1,i,n1:longint;
  {fin,fout:text;}
  a:array [1..3000] of longint;

begin
 {assign(fin,'input.txt');
 assign(fout,'output.txt');
 reset(fin);
 rewrite(fout);}
 read(i); s:=1;   s1:=0;
 for n1:=2 to i do
  begin
    n:=n1;      k:=2;
    while k<=n do
     begin
      if n mod k=0 then
       begin
        n:=n div k;
        a[s]:=k;
        k:=k-1; s:=s+1;
       end;
       k:=k+1;

     end;
     for k:=1 to s-1 do
      for n:=k+1 to s do
       if a[k]=a[n] then
        begin
         a[n]:=0;
         end;    n:=0;
      for k:=1 to s do
       if a[k]<>0 then
        begin
          n:=n+1;
          a[k]:=0;
        end;
      if n=2 then
      s1:=s1+1;
      s:=1;

  end;
  write(s1);
 {close(fin);
 close(fout); }
end.

var i,j,n,count,bil,tmp,cek:longint;

begin
  readln(n);
  for i:=2 to n do
  begin
    j:=2; bil:=i; cek:=0; tmp:=i;
    while (bil>1) do
    begin
      while (bil mod j=0) do
      bil:=bil div j;

      if (j=2) then inc(j)
      else
      inc(j,2);

      if (bil<tmp) then
      begin
        tmp:=bil;
        inc(cek);
      end;
    end;
    if cek=2 then inc(count);
  end;
  writeln(count);
end.

{$mode objfpc}
Var i, n, res: integer;

   Function Cal(x: integer): integer;
   Var j: integer;
   Begin
        result:= 0;
        for j:= 2 to x div 2 do
          if x mod j = 0 then begin
            inc(result);
            while x mod j= 0 do x:= x div j;
          end;
   End;

BEGIN
     readln(n);
     res:= 0;
     for i:= 1 to n do
       if (cal(i)= 2) then inc(res);
     writeln(res);
END.

   {$APPTYPE CONSOLE}
   var n,i,j,k,ans:integer;
       del:array[0..3000] of integer;
   begin
   readln(n);
   ans:=0;
   for i:=1 to n do
    begin
     del[i]:=0; k:=0;
     for j:=1 to i do
      if i mod j=0 then
       begin
        inc(del[i]);
        if del[j]=2 then inc(k);
       end;
     if k=2 then inc(ans);
    end;
   writeln(ans);
  end.

{$APPTYPE CONSOLE}

var n,i,j,c,count: longint;
    a: array[2..5000]of boolean;

function prost(x: LongInt): Boolean;
var i: longint;
begin
  Result := true;
  for i:=2 to round(sqrt(x)) do
    if (x mod i=0) then begin
      Result := false;
      Break;
    end;
end;

begin
  read(n);
  for i:=2 to 4000 do a[i] := True;
  for i:=2 to n do begin
    if (a[i] = False) then Continue;
    j := i;
    while (j + i<=4000) do begin
      j := j + i;
      a[j] := false;
    end;
  end;
  c := 0;
  for i:=6 to n do begin
    count := 0;
    for j := 2 to (i - 1) do
      if ((a[j] = true) and (i mod j=0)) then Inc(count);
    if (count = 2) then inc(c);
  end;
  Writeln(c);
end.

program Pq;
uses
SysUtils;
var
x,c,j,i,n,k:longint;
begin
//reset(input,'input.txt');rewrite(output,'output.txt');
read(n);
c:=0;
for i:=1 to n do
begin
k:=0;
x:=i;
for j:=2 to i do
if x mod j=0 then
begin
while x mod j=0 do
x:=x div j;
inc(k);
end;
if k=2 then inc(c);
end;
write(c);
end.

const
        fi='';
        fo='';
var
        a:array [1..3000] of longint;
        n,i,j,c,dem,dk,kq:longint;

procedure doc;
begin
        assign(input,fi);
        reset(input);
        read(n);
        close(input);
end;

procedure taomang;
begin
        for i:=2 to n do
                begin
                        dk:=0;
                        for j:=2 to trunc(sqrt(i)) do
                                if i mod j=0 then
                                        begin
                                                dk:=1; break;
                                        end;
                        if dk=0 then
                                begin
                                        inc(dem); a[dem]:=i;
                                end;
                end;
end;

procedure xuly;
begin
        for i:=6 to n do
                begin
                        c:=0;
                        for j:=1 to dem do
                                begin
                                        if i mod a[j]=0 then inc(c);
                                        if c>2 then break;
                                end;
                        if c=2 then inc(kq);
                end;
end;

procedure ghi;
begin
        assign(output,fo);
        rewrite(output);
        write(kq);
        close(output);
end;

begin
        doc;
        taomang;
        xuly;
        ghi;
end.

{$apptype console}
var
  res, r, k, n, j, z: longint;

function prost(a: longint): boolean;
var
  i: longint;
  p: boolean;
begin
  p := true;
  for i := 2 to a - 1 do
  begin
    if a mod i = 0 then p := false;
  end;
  result := p;
end;

function check(a: longint): boolean;
var
  i: longint;
begin
  r := 0;
  for i := 2 to a-1 do
  begin
    if (a mod i = 0) and (prost(i)=true) then r := r + 1;
  end;
  if r = 2 then result := true else result := false;
end;

begin
  z := 0;;
  readln(n);
  for j := 6 to n do
  begin
    if check(j) = true then z := z + 1;
  end;
  writeln(z);
end.

var k,n,i:longint;

  function check(i:longint):boolean;
    var x:longint;
      begin
       for x:=2 to i do
        if i mod x=0 then
         begin
          while i mod x=0 do i:=i div x;
          break;
         end;
if i=1 then exit(false);
x:=2;
 for x:=2 to i do
  if i mod x=0 then
   begin
    while i mod x=0 do i:=i div x;
    if i=1 then exit(true) else exit(false);
    break;
   end;
end;
 begin
 readln(N);
for i:=1 to n do
 if check(i) then inc(k);
writeln(k);
end.

Var n,i,j,k,k1,x1,x,ans:LongInt;
  begin
    ReadLn(n);
    For i:=1 to n do
     begin
       x:=i;
       k:=2;
       k1:=0;
       While x>1 do
         if x mod k=0 then
          begin
            if x1<>k then k1:=k1+1;
            x1:=k;
            x:=x div k;
          end
         else k:=k+1;
       if k1=2 then ans:=ans+1;
     end;
    WriteLn(ans);
  end.

var
  del,ch,n,i,j,x,y,m,anss,met,z:longint;
  a:array[1..4000] of longint;
  ans:array[1..100000] of longint;
begin
  readln(n);
  for i:=2 to 4000 do
    begin
      j:=i+i;
      if (a[i]=0) then begin
                         while (j<=n) do
                           begin
                             a[j]:=1;
                             j:=j+i;
                           end;
                       end;
    end;
  for i:=1 to 4000 do
    begin
      if (a[i]=0) then begin
                         inc(m);
                         ans[m]:=i;
                       end;
    end;
  for i:=6 to n do
    begin
     j:=2;
     ch:=i;
     del:=0;
     met:=0;
     while (ch mod 2)=0 do
       begin
         ch:=ch div 2;
         inc(del);
       end;
     if (del>1) then del:=1;
     for j:=3 to m do
       begin
         if (ch mod ans[j])=0 then begin
                                     inc(del);
                                     ch:=ch div ans[j];
                                   end;
       end;
     if (del=2) then inc(anss);
    end;
  writeln(anss);
end.

const fi = '';
        fo = '';
var
        f : text;
        pri : array[1..3000] of boolean;
        prime : array[1..3000] of longint;
        ts,n,i,j,count,t,h : longint;
begin
        assign(f,fi);
        reset(f);
        readln(f,n);
        Close(f);
        ts := 0;
        fillchar(pri,sizeof(pri),true);
        pri[1] := false;
        For i := 1 to n do
                if pri[i] = true then
                begin
                        inc(ts);
                        prime[ts] := i;
                        j := 1;
                        if i*2 <= n then
                        repeat
                                inc(j);
                                pri[i*j] := false;
                        Until i*(j+1) > n;
                End;
        count := 0;
        For i := 2 to n do
        begin
                t := 0;
                h := i;
                For j := 1 to ts do
                        if h mod prime[j] = 0 then
                        begin
                                inc(t);
                                repeat

                                        h := h div prime[j];
                                Until h mod prime[j] <> 0;
                                if (t = 2) or (h = 1) then
                                        break;
                        End;
                if (t = 2) and (h = 1) then
                        inc(count);
        End;
        Assign(f,fo);
        rewrite(f);
        Writeln(f,count);
        Close(f);
End.

var     n,i,j,dem : integer;
        a : array[1..3010] of integer;

BEGIN
        readln(n);
        i := 2;
        fillchar(a,sizeof(a),0);
        a[2] := 1;
        while i <= n do begin
                j := i+i;
                while j <= n do begin
                        inc(a[j]);
                        j := j + i;
                end;
                inc(i);
                while a[i] <> 0 do inc(i);
                a[i] := 1;
        end;
        dem := 0;
        for i := 1 to n do
                if a[i] = 2 then inc(dem);
        writeln(dem);
END.

var
  a, b, c, i, j, d, e, d1, t: int64;
  q, q1: boolean;
  arr: array [1..1000] of int64;

begin
  readln(a);
  i := 2;
  c := 0;
  while i <= a do begin
    j := 2;
    b := 0;
    while j * j <= i do begin
      if i mod j = 0 then begin
        inc(b);
        arr[b] := j;
        if j * j <> i then begin
          inc(b);
          arr[b] := i div j;
        end;
      end;
      inc(j);
    end;
    t := 1;
    d := 0;
    while t <= b do begin
      j := 2;
      q := true;
      while j * j <= arr[t] do begin
        if arr[t] mod j = 0 then q := false;
        if not(q) then break;
        inc(j);
      end;
      if q then inc(d);
      inc(t);
    end;
    if d = 2 then inc(c);
    inc(i);
  end;
  writeln(c);
end.

var n,i,k,s,j:integer;
    b:boolean;
procedure ex(j:integer; var b:boolean);
var i,k:integer;
begin
for i:=1 to j do
 if j mod i=0 then inc(k);
if k=2 then b:=true;
end;
begin
readln(n);
for i:=4 to n do begin
 k:=0;
 for j:=2 to i-1 do begin
  b:=false;
  if i mod j=0 then ex(j,b);
  if b=true then inc(k);
  end;
if k=2 then inc(s);
end;
writeln(s);
end.

var
n,j,i,kil,p,k,l,oz:longint;

function pros(a:longint):longint;
begin
i:=2; oz:=1;

while (i<= sqrt(a)) and (oz=1) do
if a mod i=0 then oz:=0 else i:=i+1;
if (oz=1) and (i<>1) then pros:=1 else pros:=0;
end;

begin
readln(n);
kil:=0;
for j:=1 to n do
begin
k:=0; p:=0;
for l:=2 to j-1  do
if j mod l=0 then
             begin

             if pros(l)=1 then p:=p+1;
             if p>2 then break;
             end;

 if p=2 then kil:=kil+1;
 end;

 writeln(kil);
 end.

 var k,i,n:word;
function isprime(x:word):boolean;
 var j,kd:word;
  begin
   kd:=0;
   j:=2;
   while x>1 do
    begin
     if x mod j = 0 then
      begin
       while x mod j = 0 do
        x:=x div j;
       inc(kd);
      end;
     inc(j);
    end;
   if kd=2 then isprime:=true
   else isprime:=false;
  end;
BEGIN
 k:=0;
 read(n);
 for i:=1 to n do
  if isprime(i) then
   inc(k);
 write(k);
END.

var p: array[2..3000] of boolean; q: array[2..3000] of longint;
b: boolean; i,j,n,k,m,l: longint;
begin
  readln(n);
  //setlength(p,n);
  for i:=2 to n do p[i]:=true;
  for i:=2 to n do
    if p[i] then
  begin
    j:=i*2;
    while j<=n do
    begin
      p[j]:=false;
      j:=j+i
    end
  end;
  for i:=2 to n do
    if p[i] then
    begin
      j:=i;
      while j<=n do
      begin
        q[j]:=i;
        j:=j*i
      end;
    end;
  for i:=6 to n do
  begin
    b:=false;
    for j:=2 to i-1 do
      if (q[j]>0) and (i mod j=0) then if (q[i div j]>0) and (q[j]<>q[i div j]) then b:=true;
    if b then inc(k)
  end;
  writeln(k)
end.

program codeforces;

{$APPTYPE CONSOLE}
{$R+ Q+ I+}

uses
  SysUtils;

var
  i,n,j,ans,t: integer;
  p: array[1..3000]of integer;
begin
  read(n);
  for i:=2 to n do begin
    if p[i]=0 then Begin
      for j:=1 to n do begin
        if i*j>n then break;
        if p[i*j]=0 then p[i*j]:=i;
      end;
    end;
  end;
  t:=0;
  for i:=1 to n do begin
    ans:=0;
    for j:=1 to i do
       if (i mod j=0) and (p[j]=j) then inc(ans);
    if ans=2 then inc(t);
  end;
  write(t);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  list=array[1..1000000]of integer;
var
  a,b:list;
  n,k,p,i,j,h,l,g,c,e,k1,y,m:Integer;
function lol(n:integer):Integer;
var
  i,k:integer;
begin
  k:=0;
  for i:=1 to n do if (n mod i=0) then inc(k);
  if(k=2) then lol:=1
    else lol:=0;
end;
begin
  Readln(n);
  for i:=1 to n do if (lol(i)=1) then
    begin
      Inc(k);
      a[k]:=i;
    end;
  m:=0;
  for i:=6 to n do
    begin
      k1:=0;
      for j:=1 to k do
        begin
          if (i mod a[j]=0) then Inc(k1);
        end;
      if (k1=2) then Inc(m);
    end;
  write(m);
  Readln;
  readln;
end.

const
  input= '';
  output='';
var
  fi,fo:text;
   m,n,k,s,kq:longint;
procedure opf;
begin
  assign(fi,input);reset(fi);
  assign(fo,output);rewrite(fo);
end;

procedure clf;
begin
  close(fi);
  close(fo);
end;

function check(x:longint):boolean;
var i,j:longint;
begin
  j:=trunc(sqrt(x));
  for i:=2 to j do
   if x mod i=0 then
     begin
       check:=false;
       exit;
     end;
   check:=true;
end;
procedure init;
var i,j:longint;
begin
  readln(fi,n);
  kq:=0;
  for i:=6 to n do
    begin
      m:=i;
      s:=0;
      for j:=2 to m-1 do
      if m mod j=0 then
      if check(j)=true then
        inc(s);
      if s=2 then inc(kq);
    end;
  writeln(fo,kq);
end;

procedure solve;
begin
end;

procedure main;
begin
  init;
  solve;
end;

Begin
  opf;
  main;
  clf;
End.

Var n,i,dd:Integer;

Function NT(x:Integer):Boolean;
Var j:Integer;
Begin
NT:=True;
If x<=1 then
  Begin
    NT:=False;
    Exit;
  End;
For j:=2 to Trunc(Sqrt(x)) do
  If x Mod j=0 then
    Begin
      NT:=False;
      Exit;
    End;
End;

Procedure Solve(x:Integer);
Var j,d:Integer;
Begin
d:=0;
For j:=2 to Trunc(Sqrt(x)) do
  If x Mod j=0 then
    Begin
      If NT(j) then Inc(d);
      If (j<> x Div j) And NT(x Div j) then Inc(d);
    End;
If d=2 then Inc(dd);
End;

BEGIN
Readln(n);
dd:=0;
For i:=1 to n do Solve(i);
Writeln(dd);
END.

var a:array[1..1500] of integer;
    aa:array[1..240] of integer;
    i,j,n:integer;
    k,w,kol:integer;
begin
readln(n);
for i:=1 to n div 2 do
a[i]:=0;
 k:=1;  kol:=0;

for j:=2 to 37 do
 for i:=j+1 to n div 2 do
 if a[i]<>1 then if i mod j = 0 then a[i]:=1;

 for i:=2 to n div 2 do
 if a[i]= 0 then begin aa[k]:=i; k:=k+1; end;
 k:=k-1;

for i:=1 to n do
begin
w:=0;
 for j:=1 to k do
 if (i<>aa[j]) and (i mod aa[j] = 0) then  w:=w+1;
if w = 2 then kol:=kol+1;
end;

writeln(kol);

end.

var i,j,n,count,bil,tmp,cek:longint;

begin
  readln(n);
  for i:=2 to n do
  begin
    j:=2; bil:=i; cek:=0; tmp:=i;
    while (bil>1) do
    begin
      while (bil mod j=0) do
      bil:=bil div j;

      if (j=2) then inc(j)
      else
      inc(j,2);

      if (bil<tmp) then
      begin
        tmp:=bil;
        inc(cek);
      end;
    end;
    if cek=2 then inc(count);
  end;
  writeln(count);
end.

var
 i,j,n,m,k,t,x:longint;
 f:array[0..5555]of boolean;
begin
 readln(n);
 for i:=2 to 5000 do if not f[i] then
 begin
  j:=i*i;
  while j<=5000 do
  begin
   f[j]:=true;
   inc(j,i);
  end;
 end;
 for i:=2 to n do
 begin
  k:=0;
  for j:=2 to i do if(i mod j=0)and(not f[j])then inc(k);
  if k=2 then inc(x);
 end;
 writeln(x);
end.

var
          dau:array[0..3000] of boolean;
          nt:array[0..3000] of longint;
          n,k,kq,i,j,m,x:longint;
function check(x:longint):boolean;
var
          i:longint;
begin
          check:=true;
          for i:=2 to trunc(sqrt(x)) do
                    if x mod i = 0 then exit(false);
end;
begin
          readln(n);
          k:=0;
          for i:=2 to n do
                    if check(i)=true then
                    begin
                              inc(k);
                              nt[k]:=i;
                    end;
          kq:=0;
          for i:=1 to n do
          begin
                    m:=0;
                    for j:=1 to k do
                    begin
                              if i mod nt[j]=0 then inc(m);
                              if m>2 then break;
                    end;
                    if m=2 then inc(kq);
          end;
          writeln(kq);
end.

var n,l,i: integer;

function IsPrime(a: integer):boolean;
var i,limit: integer;
    flag: boolean;
begin
     if a=1 then IsPrime := false
            else if a<4 then IsPrime := true
                        else if a mod 2 = 0 then IsPrime := false
                                            else
     begin

          flag:=true;
          i:=3;
          limit := trunc(sqrt(a))+1;
          while (i<=limit) and flag do
          begin
               flag := a mod i <> 0;
               i:=i+2
          end;
          IsPrime := flag
     end;
end;

function NextPrime(a: integer):integer;
var p: integer;
begin
     if a = 2 then begin NextPrime:=3; exit end;
     p:=a+2;
     while not IsPrime(p) do p:=p+2;
     NextPrime:=p;
end;

function PochtiProstoe(a: integer):boolean;
var kol,next: integer;
begin
     next:=2;
     kol:=0;

     while a>1 do
     begin
          if a mod next = 0 then
          begin
              inc(kol);
              while (a mod next = 0) and (a>1) do a := a div next;
          end;
          next:=NextPrime(next)
     end;
     if kol = 2 then PochtiProstoe:=true
                else PochtiProstoe:=false
end;

BEGIN
   readln(n);
   l:=0;
    for i:=1 to n do if PochtiProstoe(i) then inc(l);
    writeln(l)

END.

var n,i,j,a,r,k:word;
begin
  read(n);
  for i:=6to n do
    begin
      k:=i;
      a:=0;
      for j:=2to i div 2+1do
        while k mod j=0do
          begin
            k:=k div j;
            if k mod j<>0then inc(a)
          end;
      if a=2then inc(r)
    end;
  write(r);
end.

var k,i,j,q,p,ans,n:longint;
b:boolean;
s:array [1..1500] of longint;
begin
read(n);

p:=1;
s[p]:=2;
q:=(n div 2) +1;

for i:=3 to q do begin
b:=false;
for j:=1 to p do
if i mod s[j]=0 then begin
b:=true;
break;
end;
if not b then begin
inc(p);
s[p]:=i
end;
end;

ans:=0;
for i:=1 to n do     begin
k:=0;
for j:=1 to p do  begin
if i mod s[j]=0 then inc(k);
if k>2 then break;
end;
if k=2 then inc(ans);
end;
write(ans);
end.

var
  n,i,j,kol,k,kolrazdel:integer;
  prost:array[2..3000] of boolean;
  flag:boolean;

begin
  readln(n);
  for i:=2 to (n div 2) do
  begin
    prost[i]:=true;
  end;
  i:=2;
  while i<n do
  begin
    if prost[i] then
    begin
      j:=i;
      while j<n do
      begin
        inc(j,i);
        prost[j]:=false
      end;
    end;
    inc(i);
  end;
  kol:=0;
  for k:=6 to n do
  begin
    j:=k;
    kolrazdel:=0;
    for i:=(k div 2 +1) downto 2 do
    begin
      if prost[i] then
      begin
        if j mod i = 0 then inc(kolrazdel);
        while j mod i = 0 do
        begin
          j:=j div i;
        end;
      end;
    end;
    if kolrazdel = 2 then inc(kol);
  end;
  write(kol);
end.

var n,i,j,k,x:integer;
function prime(y:integer):boolean;
var ans:boolean;
    i:integer;
begin
    ans:=true;
    for i:=2 to trunc(sqrt(y)) do
        if y mod i=0 then begin
            ans:=false;
            break;
        end;
    if y=2 then
        prime:=true
    else
        prime:=ans;
end;
begin
    readln(n);
    x:=0;
    for i:=2 to n do begin
        k:=0;
        for j:=2 to (i div 2) do
            if prime(j)and(i mod j=0) then
                inc(k);
        if k=2 then
            inc(x);
    end;
    writeln(x);
    readln;
end.

program _A;
{$O-}
{$APPTYPE CONSOLE}

uses
  SysUtils;
var
	n,r,i:integer;
function simple(x:integer):boolean;
var
	i:integer;
begin
	result:=false;
    if (x=2) then
    begin
    	result:=true;
        exit;
    end;
	for i:=2 to round(sqrt(x)) do
    	if ((x mod i) = 0) then
        	exit;
    result:=true;
end;
function check(x:integer):boolean;
var
	i,c:integer;
begin
	c:=0;
	for i:=2 to x-1 do
    	if (x mod i = 0) then
        	if (simple(i)) then
            	inc(c);
    check:= c = 2;
end;
begin
	{assign(input,'input.txt');reset(input);
    assign(output,'output.txt');rewrite(output);}
    read(n);
    r:=0;
    for i:= 4 to n  do
    	if check(i) then inc(r);
    writeln(r);
    {close(output);
    close(input);}
end.

program a26;

{$APPTYPE CONSOLE}

uses
  SysUtils;

Var x,c,j,i,n,k:Integer;
Begin
     readln (n);
     c:=0;
     for i := 1 to n do
     begin
          k:=0;
          x:=i;
          for j := 2 to i do
          if (x mod j = 0) then
            begin
              while (x mod j = 0) do
                x:=x div j;
                inc (k);
            end;
          If (k = 2) then
            inc(c);
    end;
  Writeln (c);
End.

var
n,k,i,f,z,D,q:integer;
begin
    readln(n);

     for i:=1 to n do
     begin
         z:=0;
         for k:=2 to i-1 do
         begin
             if i mod k=0 then
             begin
                 f:=0;
                 for q:=2 to k-1 do
                 if k mod q=0 then f:=1;
                 if  f=0 then z:=z+1;
             end;
         end;
        if z=2 then D:=D+1;
     end;

     writeln(D);
end.

var n, i, k, t, m: integer;
    j: longint;
    p: array [1..239] of integer;
    q: array [2..1499] of boolean;
begin
        readln(n);
        k := 0;
        for i := 2 to n div 2 do
        begin
                if q[i] then continue;
                inc(k);
                p[k] := i;
                j := sqr(longint(i));
                while j <= n div 2 do
                begin
                        q[j] := true;
                        inc(j, i);
                end;
        end;
        t := 0;
        for i := 1 to n do
        begin
                m := 0;
                for j := 1 to k do
                        if i mod p[j] = 0 then
                                inc(m);
                if m = 2 then
                        inc(t);
        end;
        writeln(t);
end.

{CF26A}
var
n,i,s:longint;
function isp(n:longint):boolean;
 var
 i:longint;
 begin
 for i:=2 to trunc(sqrt(n)) do
  if n mod i=0 then
  exit(false);
 exit(true);
 end;
function num(n:longint):longint;
 var
 i,x:longint;
 begin
 x:=0;
 for i:=2 to n do
  if (n mod i=0) and isp(i) then
  inc(x);
 num:=x;
 end;
begin
read(n);
s:=0;
for i:=6 to n do
 if num(i)=2 then
 inc(s);
writeln(s);
end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q+,R+,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE GUI}
{$WARN SYMBOL_DEPRECATED ON}
{$WARN SYMBOL_LIBRARY ON}
{$WARN SYMBOL_PLATFORM ON}
{$WARN UNIT_LIBRARY ON}
{$WARN UNIT_PLATFORM ON}
{$WARN UNIT_DEPRECATED ON}
{$WARN HRESULT_COMPAT ON}
{$WARN HIDING_MEMBER ON}
{$WARN HIDDEN_VIRTUAL ON}
{$WARN GARBAGE ON}
{$WARN BOUNDS_ERROR ON}
{$WARN ZERO_NIL_COMPAT ON}
{$WARN STRING_CONST_TRUNCED ON}
{$WARN FOR_LOOP_VAR_VARPAR ON}
{$WARN TYPED_CONST_VARPAR ON}
{$WARN ASG_TO_TYPED_CONST ON}
{$WARN CASE_LABEL_RANGE ON}
{$WARN FOR_VARIABLE ON}
{$WARN CONSTRUCTING_ABSTRACT ON}
{$WARN COMPARISON_FALSE ON}
{$WARN COMPARISON_TRUE ON}
{$WARN COMPARING_SIGNED_UNSIGNED ON}
{$WARN COMBINING_SIGNED_UNSIGNED ON}
{$WARN UNSUPPORTED_CONSTRUCT ON}
{$WARN FILE_OPEN ON}
{$WARN FILE_OPEN_UNITSRC ON}
{$WARN BAD_GLOBAL_SYMBOL ON}
{$WARN DUPLICATE_CTOR_DTOR ON}
{$WARN INVALID_DIRECTIVE ON}
{$WARN PACKAGE_NO_LINK ON}
{$WARN PACKAGED_THREADVAR ON}
{$WARN IMPLICIT_IMPORT ON}
{$WARN HPPEMIT_IGNORED ON}
{$WARN NO_RETVAL ON}
{$WARN USE_BEFORE_DEF ON}
{$WARN FOR_LOOP_VAR_UNDEF ON}
{$WARN UNIT_NAME_MISMATCH ON}
{$WARN NO_CFG_FILE_FOUND ON}
{$WARN MESSAGE_DIRECTIVE ON}
{$WARN IMPLICIT_VARIANTS ON}
{$WARN UNICODE_TO_LOCALE ON}
{$WARN LOCALE_TO_UNICODE ON}
{$WARN IMAGEBASE_MULTIPLE ON}
{$WARN SUSPICIOUS_TYPECAST ON}
{$WARN PRIVATE_PROPACCESSOR ON}
{$WARN UNSAFE_TYPE ON}
{$WARN UNSAFE_CODE ON}
{$WARN UNSAFE_CAST ON}
Uses Math,SysUtils;
Var I,K,T,N,J,mi,Nm,L:Integer;m:array[1..1000] of Integer;f:boolean;
Begin
   ///reset(input,'Input.txt');
   ///assign(output,'Output.txt');
   K:=3;
   m[1]:=2;
   m[2]:=3;
   m[3]:=5;
   J:=5;
   While J<1500 do
   begin
      Inc(J,2);
      L:=Round(sqrt(J))+1;
      f:=true;
      T:=1;
      While (T<=K) and (m[T]<=L) do
      begin
         If J mod m[T]=0
         then begin
                 f:=false;
                 Break;
              end;
         Inc(T);
      end;
      If f
      then begin
              Inc(K);
              m[K]:=J;
           end;
   end;
   readln(N);
   L:=0;
   For I:=1 to N do
   begin
      T:=0;
      J:=1;
      While (m[J]<I) and (J<=K) do
      begin
         if I mod m[J]=0
         then Inc(T);
         Inc(J);
      end;
      if T=2
      then Inc(L);
   end;
   write(L);
End.

program _26A;
var
  a : array[1..3000] of longint;
  n, i, j : longint;
begin
  read(n);
  a[1] := 1;
  for i := 2 to n div 2 do
    if a[i] = 0
       then begin
              j := i + i;
              while j <= n do
                begin
                  inc(a[j], 1);
                  inc(j, i);
                end;
            end;
  j := 0;
  for i := 1 to n do
    if a[i] = 2
       then inc(j);
  write(j);
end.

var j,i,n,s,sum:longint;
  function ss(x:longint):boolean;
  var i:longint;
  begin
    for i:=2 to trunc(sqrt(x)) do
     if x mod i=0 then exit(false);
    exit(true);
  end;
begin
  readln(n);
  for j:=1 to n do
   begin
    s:=0;
   for i:=2 to j div 2 do
    begin
      if j mod i=0 then if ss(i) then s:=s+1;
    end;
    if s=2 then sum:=sum+1;
   end;
  writeln(sum);
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   Source='input.txt';
   Target='output.txt';
Var
   a:Array[1..3000] of Boolean;
   b:Array[1..430] of Integer;
   n,i,k,t,p,s,j:Integer;
Begin
   Read(n);
   If n=1 Then Begin
      Write(0);
      Halt;
   End;
   a[1]:=false;
   For i:=2 To n Do a[i]:=true;
   t:=1;
   While True Do Begin
      p:=t+1;
      While a[p]<>true Do p:=p+1;
      t:=p;
      If t>Round(sqrt(n)) Then Break;
      While p+t<=n Do Begin
         p:=p+t;
         a[p]:=false;
      End;
   End;
   k:=0;
   For i:=1 To n Do
      If a[i] Then Begin
         k:=k+1;
         b[k]:=i;
      End;
   s:=0;
   For i:=1 To k-1 Do
      For j:=i+1 To k Do
         If b[i]*b[j]<=n Then Begin
            s:=s+n div (b[i]*b[j]);
         End
         Else Break;
   Write(s);
End.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   Source='input.txt';
   Target='output.txt';
Var
   a:Array[1..3000] of Boolean;
   b:Array[1..430] of Integer;
   n,i,k,t,p,s,j:Integer;
Begin
   Read(n);
   If n=1 Then Begin
      Write(0);
      Halt;
   End;
   a[1]:=false;
   For i:=2 To n Do a[i]:=true;
   t:=1;
   While True Do Begin
      p:=t+1;
      While a[p]<>true Do p:=p+1;
      t:=p;
      If t>Round(sqrt(n)) Then Break;
      While p+t<=n Do Begin
         p:=p+t;
         a[p]:=false;
      End;
   End;
   k:=0;
   For i:=1 To n Do
      If a[i] Then Begin
         k:=k+1;
         b[k]:=i;
      End;
   s:=0;
   For i:=1 To n Do a[i]:=false;
   For i:=1 To k-1 Do
      For j:=i+1 To k Do
         If b[i]*b[j]<=n Then Begin
            t:=b[i]*b[j];
            p:=t;
            a[p]:=true;
            s:=s+1;
            While p+t<=n Do Begin
               p:=p+t;
               If a[p] Then Begin
                  s:=s-1;
                  Continue;
               End;
               WriteLn(p);
               a[p]:=true;
               s:=s+1;
            End;
         End
         Else Break;
   Write(s);
End.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   Source='input.txt';
   Target='output.txt';
Var
   a:Array[1..3000] of Boolean;
   b:Array[1..430] of Integer;
   n,i,k,t,p,s,j:Integer;
Begin
   Read(n);
   If n=1 Then Begin
      Write(0);
      Halt;
   End;
   a[1]:=false;
   For i:=2 To n Do a[i]:=true;
   t:=1;
   While True Do Begin
      p:=t+1;
      While a[p]<>true Do p:=p+1;
      t:=p;
      If t>Round(sqrt(n)) Then Break;
      While p+t<=n Do Begin
         p:=p+t;
         a[p]:=false;
      End;
   End;
   k:=0;
   For i:=1 To n Do
      If a[i] Then Begin
         k:=k+1;
         b[k]:=i;
      End;
   s:=0;
   For i:=1 To n Do a[i]:=false;
   For i:=1 To k-1 Do
      For j:=i+1 To k Do
         If b[i]*b[j]<=n Then Begin
            t:=b[i]*b[j];
            p:=t;
            a[p]:=true;
            WriteLn(b[i],' ',b[j],' ',p);
            s:=s+1;
            While p+t<=n Do Begin
               p:=p+t;
               If a[p] Then Begin
                  s:=s-1;
                  Continue;
               End;
               WriteLn(p);
               a[p]:=true;
               s:=s+1;
            End;
         End
         Else Break;
   Write(s);
End.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   Source='input.txt';
   Target='output.txt';
Var
   a:Array[1..3000] of Boolean;
   b:Array[1..430] of Integer;
   n,i,k,t,p,s,j:Integer;
Begin
   Read(n);
   If n=1 Then Begin
      Write(1);
      Halt;
   End;
   a[1]:=false;
   For i:=2 To n Do a[i]:=true;
   t:=1;
   While True Do Begin
      p:=t+1;
      While a[p]<>true Do p:=p+1;
      t:=p;
      If t>Round(sqrt(n)) Then Break;
      While p+t<=n Do Begin
         p:=p+t;
         a[p]:=false;
      End;
   End;
   k:=0;
   For i:=1 To n Do
      If a[i] Then Begin
         k:=k+1;
         b[k]:=i;
      End;
   s:=0;
   For i:=1 To k-1 Do
      For j:=i+1 To k Do
         If b[i]*b[j]<=n Then Begin
            s:=s+n div (b[i]*b[j]);
         End
         Else Break;
   Write(s);
End.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Const
   Source='input.txt';
   Target='output.txt';
Var
   a:Array[1..3000] of Boolean;
   b:Array[1..430] of Integer;
   n,i,k,t,p,s,j:Integer;
Begin
   Read(n);
   If n=1 Then Begin
      Write(0);
      Halt;
   End;
   a[1]:=false;
   For i:=2 To n Do a[i]:=true;
   t:=1;
   While True Do Begin
      p:=t+1;
      While a[p]<>true Do p:=p+1;
      t:=p;
      If t>Round(sqrt(n)) Then Break;
      While p+t<=n Do Begin
         p:=p+t;
         a[p]:=false;
      End;
   End;
   k:=0;
   For i:=1 To n Do
      If a[i] Then Begin
         k:=k+1;
         b[k]:=i;
      End;
   s:=0;
   For i:=1 To n Do a[i]:=false;
   For i:=1 To k-1 Do
      For j:=i+1 To k Do
         If b[i]*b[j]<=n Then Begin
            t:=b[i]*b[j];
            p:=t;
            a[p]:=true;
            s:=s+1;
            While p+t<=n Do Begin
               p:=p+t;
               If a[p] Then Begin
                  s:=s-1;
                  Continue;
               End;
               a[p]:=true;
               s:=s+1;
            End;
         End
         Else Break;
   Write(s);
End.

program Project_26_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fi,fo:text;
  a,b:array[1..1000]of integer;

  i,n,k,t,ans,j,f,d,m:integer;
  function check(t:integer):boolean;
    begin
       check:=false;
       for f:=2 to trunc(sqrt(t+1)) do
       if (t mod f=0) then   check:=true;

    end;
begin

read(n);
t:=1;
a[1]:=2;
for i:=3 to n do
  begin
  if (check(i)=false) then
   begin
   inc(t);
   a[t]:=i;
   end;
  end;
ans:=0;
d:=1;
m:=1;
for i:=1 to t do
  for j:=i+1 to t do
     begin
     b[m]:=a[i]*a[j];
     inc(m);
     end;
for i:=1 to n do
  begin
  for j:=1 to m-1 do
   if (i mod b[j]=0) then inc(ans);
  end;

write(ans);

end.

program Project_26_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fi,fo:text;
  a:array[1..1000]of integer;
  i,n,k,t,ans,j,f,d:integer;
  function check(t:integer):boolean;
    begin
       check:=false;
       for f:=2 to trunc(sqrt(t+1)) do
       if (t mod f=0) then   check:=true;

    end;
begin

read(n);
t:=1;
a[1]:=2;
for i:=3 to n do
  begin
  if (check(i)=false) then
   begin
   inc(t);
   a[t]:=i;
   end;
  end;
ans:=0;
d:=1;
while (d<n) do
  begin
  for i:=1 to t do
    for j:=i+1 to t do
      begin

      k:=a[i]*a[j];
      if (d mod k=0) then inc(ans);

      end;
   inc(d);
  end  ;
write(ans+1);

end.

program Project_26_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fi,fo:text;
  a:array[1..1000]of integer;
  i,n,k,t,ans,j,f,d:integer;
  function check(t:integer):boolean;
    begin
       check:=false;
       for f:=2 to trunc(sqrt(t+1)) do
       if (t mod f=0) then   check:=true;

    end;
begin

read(n);
t:=1;
a[1]:=2;
for i:=3 to n do
  begin
  if (check(i)=false) then
   begin
   inc(t);
   a[t]:=i;
   end;
  end;
ans:=0;
d:=1;
while (d<n) do
  begin
  for i:=1 to t do
    for j:=i+1 to t do
      begin

      k:=a[i]*a[j];
      if (d mod k=0) then inc(ans);

      end;
   inc(d);
  end  ;
 if (ans=0) then write (0) else
write(ans+1);

end.

program Project_26_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fi,fo:text;
  a:array[1..1000]of integer;
  i,n,k,t,ans,j,f,d:integer;
  function check(t:integer):boolean;
    begin
       check:=false;
       for f:=2 to trunc(sqrt(t+1)) do
       if (t mod f=0) then   check:=true;

    end;
begin

read(n);
t:=1;
a[1]:=2;
for i:=3 to n do
  begin
  if (check(i)=false) then
   begin
   inc(t);
   a[t]:=i;
   end;
  end;
ans:=0;
d:=1;
while (d<n) do
  begin
  for i:=1 to t do
    for j:=i+1 to t do
      begin

      k:=a[i]*a[j];
      if (d mod k=0) then inc(ans);

      end;
   inc(d);
  end  ;
 if (n=1) then write (0) else
write(ans+1);

end.

program sort;
var n,i,k,p,z,l:integer;
begin

  readln(n);
   l:=0;
  for i:=1 to n do begin
     k:=0;
     for z:=2 to trunc(sqrt(n)) do
      if i mod z=0 then k:=k+1;
     if k=2 then l:=l+1;

  end;
  writeln(l);
end.

var a:Array[1..3000] of longint;
    p:array[1..1000] of longint;
    n,i,j,q,k:longint;
begin
 read(n);
 fillchar(a,sizeof(a),0);
 q:=0;
 for i:=2 to n do
  if a[i]=0
   then begin
         inc(q);
         p[q]:=i;
         j:=i*2;
         while j<=n do
          begin
           a[j]:=1;
           inc(j,i);
          end;
        end;
 k:=0;
 for i:=1 to q-1 do
  for j:=i+1 to q do
   if p[i]*p[j]<=n
    then inc(k)
    else break;
 write(k);
end.

var
a,b,c,c2,i,k,j,n:longint;
begin
read(n);
k:=0;
c2:=0;
c:=0;
for i:=9 to n do   begin
for j:=2 to n do  begin
if (i mod j=0) and (j<>2) then begin  a:=j;
for b:=1 to n do
if (a mod b=0)    then k:=k+1;

if (k=2)   then c:=c+1;

k:=0;
end;
end;
if c=1 then c2:=c2+1;
c:=0;
end;

writeln(c2);
end.

program zadacha26a;
var  a:array[1..3000] of integer;
     b:array[2..3000] of byte;
     n,k,i,j,l,p:integer;
begin
{assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);}
readln(n);
k:=0;
for i:=1 to 3000 do
b[i]:=0;
for i:=2 to trunc(sqrt(3000))+1 do
 begin
 if b[i]=0 then
  j:=i*i;
 while j<=3000 do
  begin
  b[j]:=1;
  j:=j+i;
  end;
 end;
for i:=1 to n do
 begin
 l:=1;
 for j:=2 to trunc(sqrt(i)) do
  begin
  if i mod j=0 then
   begin
   a[l]:=j;
   inc(l);
   end;
  if i div j<>j then
   begin
   a[l]:=i div j;
   inc(l);
   end;
  end;
 p:=0;
 for j:=1 to l-1 do
  if b[a[j]]=0 then inc(p);
 if p=2 then inc(k);
 end;
write(k);
{close(input); close(output);}
end.

program zadacha26a;
var  a:array[1..3000] of integer;
     b:array[2..3000] of byte;
     n,k,i,j,l,p:integer;
begin
{assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);}
readln(n);
k:=0;
for i:=1 to 3000 do
 b[i]:=0;
for i:=2 to trunc(sqrt(3000))+1 do
 begin
 if b[i]=0 then
  j:=i*i;
 while j<=3000 do
  begin
  b[j]:=1;
  j:=j+i;
  end;
 end;
for i:=6 to n do
 begin
 l:=1;
 for j:=2 to trunc(sqrt(i)) do
  begin
  if i mod j=0 then
   begin
   a[l]:=j;
   inc(l);
   end;                                               {}
  if i div j<>j then
   begin
   a[l]:=i div j;
   inc(l);
   end;
  end;
 p:=0;
 for j:=1 to l-1 do
  if b[a[j]]=0 then inc(p);
 if p=2 then inc(k);
 end;
write(k);
{close(input); close(output);}
end.

program zadacha26a;
var  a:array[1..3000] of integer;
     b:array[2..3000] of byte;
     n,k,i,j,l,p:integer;
begin
{assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);}
readln(n);
k:=0;
for i:=1 to 3000 do
b[i]:=0;
for i:=2 to trunc(sqrt(3000))+1 do
 begin
 if b[i]=0 then
  j:=i*i;
 while j<=3000 do
  begin
  b[j]:=1;
  j:=j+i;
  end;
 end;
for i:=6 to n do
 begin
 l:=1;
 for j:=2 to trunc(sqrt(i)) do
  begin
  if i mod j=0 then
   begin
   a[l]:=j;
   inc(l);
   end;
  if i div j<>j then
   begin
   a[l]:=i div j;
   inc(l);
   end;
  end;
 p:=0;
 for j:=1 to l do
  if b[a[j]]=0 then inc(p);
 if p=2 then inc(k);
 end;
write(k);
{close(input); close(output);}
end.

program zadacha26a;
var  a:array[1..3000] of integer;
     b:array[2..3000] of byte;
     n,k,i,j,l,p:integer;
begin
{assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);}
readln(n);
k:=0;
for i:=1 to 3000 do
 b[i]:=0;
for i:=2 to trunc(sqrt(3000))+1 do
 begin
 if b[i]=0 then
  j:=i*i;
 while j<=3000 do
  begin
  b[j]:=1;
  j:=j+i;
  end;
 end;
for i:=6 to n do
 begin
 l:=1;
 for j:=2 to trunc(sqrt(i))+1 do
  begin
  if i mod j=0 then
   begin
   a[l]:=j;
   inc(l);
   end;
  if i div j<>j then
   begin
   a[l]:=i div j;
   inc(l);
   end;
  end;
 p:=0;
 for j:=1 to l-1 do
  if b[a[j]]=0 then inc(p);
 if p=2 then inc(k);
 end;
write(k);
{close(input); close(output);}
end.

program zadacha26a;
var  a:array[1..3000] of integer;
     b:array[2..3000] of byte;
     n,k,i,j,l,p:integer;
begin
{assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);}
readln(n);
k:=0;
for i:=1 to 3000 do
b[i]:=0;
for i:=2 to trunc(sqrt(3000))+1 do
 begin
 if b[i]=0 then
  j:=i*i;
 while j<=3000 do
  begin
  b[j]:=1;
  j:=j+i;
  end;
 end;
for i:=6 to n do
 begin
 l:=1;
 for j:=2 to trunc(sqrt(i)) do
  begin
  if i mod j=0 then
   begin
   a[l]:=j;
   inc(l);
   end;
  if i div j<>j then
   begin
   a[l]:=i div j;
   inc(l);
   end;
  end;
 p:=0;
 for j:=1 to l-1 do
  if b[a[j]]=0 then inc(p);
 if p=2 then inc(k);
 end;
write(k);
{close(input); close(output);}
end.

const
    finp='';
    fout='';
var i,n,KQ:longint;
    f,g:text;
function kt(x:longint):boolean;
var i:longint;
begin
    if x=1 then exit(false);
    for i:=2 to trunc(sqrt(x)) do
        if x mod i=0 then exit(false);
    exit(true);
end;
{----------------------------}
function dem(x:longint):boolean;
var i,p,d:longint;
begin
    d:=0;
    for i:=2 to trunc(sqrt(x)) do
        begin
            if x mod i=0 then
                begin
                    p:=x div i;
                    if kt(p) then inc(d);
                    if kt(i) then inc(d);
                    if p=i then dec(d);
                end;
            if d>2 then exit(false);
        end;
    if d=2 then exit(true)
    else exit(false);
end;
{----------------------------}
begin
    assign(f,finp); reset(f);
    assign(g,fout); rewrite(g);
    readln(f,n); KQ:=0;
    for i:=1 to n do
        if dem(i) then inc(KQ);
    write(g,KQ); close(f); close(g);
end.

var
  n,m,k:longint;
  s,s1:extended;
begin
  readln(n,m,k);
  s1:=1;
  for k:=0 to k do begin
    s:=(m-k)/(n+k+1);
   s1:=s1*s;
  end;
  if s1>1 then s1:=0
  else s1:=1-s1;
  writeln(s1:0:8);
end.

var n, i, j, k, d, h:integer;
    s            :array[1..3000] of longint;

function prime(a:longint):boolean;
var i,r:longint;
begin
     r:=round(sqrt(a));
     i:=2;
     while (i<=r)and(a mod i<>0) do inc(i);
     if i>r then exit(true) else exit(false);
end;

procedure process ;
var kt:boolean;
begin
        j:=0; d:=0;
        for i:=2 to n do if prime(i) then
        begin
             inc(j);
             s[j]:=i;
        end;

        for i:=1 to n do
        begin
        kt:=true;
        for k:=1 to j do
        begin
        for h:=k+1 to j do if(i mod s[k]=0)and(i mod s[h]=0 ) then
        begin
             inc(d);
             kt:=false;
             break;
        end;
        if kt=false then break;
        end;
        end;
end;

begin
        readln(n);
        process;
        writeln(d);
end.

const
    d:array [1..16] of longint = (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53);
var
    i,j,n,k,m,kol,ans:longint;
begin
 readln(n);
 for i:=6 to n do
   begin
     j:=1; kol:=0;
     while d[j]<i do
       begin
        if i mod d[j]=0 then inc(kol);
        inc(j);
       end;
     if kol=2 then inc(ans);
  end;
  writeln(ans);
end.

var
 n,i,j,ans:longint;
 a:array[1..3000] of boolean;
function work(x:longint):boolean;
var i:longint;
begin
 for i:=2 to trunc(sqrt(x)) do
  if (x mod i=0) and (x mod (x div i)=0) and (i*i<>x) and not a[i] and not a[x div i] then exit(true);
 exit(false);
end;
begin
 read(n);
  for i:=2 to trunc(sqrt(n)) do
   if not a[i] then
   for j:=2 to n div i do
   a[i*j]:=true;
    for i:=6 to n do
     if work(i) then inc(ans);
    writeln(ans);
end.

var j,i,n,s,sum:longint;
  function ss(x:longint):boolean;
  var i:longint;
  begin
    for i:=2 to trunc(sqrt(x)) do
     if x mod i=0 then exit(false);
    exit(true);
  end;
begin
  readln(n);
  for j:=1 to n do
   begin
    s:=0;
   for i:=2 to trunc(sqrt(j)) do
    begin
      if j mod i=0 then if ss(i) then s:=s+1;
    end;
    if s=2 then sum:=sum+1;
   end;
  writeln(sum);
end.

Var a:array [0..10000] of longint;
  b:array [0..10000] of longint;
   n,i,p,k,j,o:longint;

   function prost(x:longint):boolean;
    var i,k:longint;
     begin
       k:=0;
       for i:=2 to round(sqrt(x)) do
        if x mod i=0 then begin prost:=false; exit; end;
        prost:=true;
     end;

  begin
    read(n);
    for i:=1 to n do
     begin
     k:=0;
       for j:=2 to round(sqrt(i)) do
        begin
          if (i mod j=0) then begin inc(k); a[k]:=j; inc(k); a[k]:=i div j; end;
        end;
        o:=0;
        fillchar(b,sizeof(b),0);
       for j:=1 to k do
        begin
          if (b[a[j]]=0)and (prost(a[j])) then begin inc(o); inc(b[a[j]]) end;
          if o>1 then begin  inc(p); break; end;
        end;
     end;
     writeln(p);
  end.

{CF26A}
var
n,i,s:longint;
function isp(n:longint):boolean;
 var
 i:longint;
 begin
 for i:=2 to trunc(sqrt(n)) do
  if n mod i=0 then
  exit(false);
 exit(true);
 end;
function num(n:longint):longint;
 var
 i,x:longint;
 begin
 x:=0;
 for i:=2 to n do
  if (n mod i=0) and isp(i) then
  inc(x);
 num:=x;
 end;
begin
read(n);
s:=0;
for i:=6 to n do
 if num(i)>1 then
 inc(s);
writeln(s);
end.

var
	n , kq : longint;
	nt : array [ 0 .. 3001 ] of boolean;
//===============================================
procedure nhap;
	var
		f : text;
	begin
        assign( f , '' );
		reset( f );
		readln( f , n );
		close( f );
	end;
//===============================================
procedure sang;
	var
		i , j : longint;
	begin
		fillchar( nt , sizeof( nt ) , true );
		nt[ 1 ] := false;
		nt[ 0 ] := false;
		for i := 2 to trunc( sqrt( n div 2 ) ) do
			if nt[ i ] then
				begin
					j := i * i;
					while j < n do
						begin
							nt[ j ] := false;
							j := j + i;
						end;
				end;
		for i := 2 to n div 2 do
			begin
				j := i * i;
				while j <= n div 2 do
					begin
						nt[ j ] := true;
						j := j * i;
					end;
			end;
	end;
//===============================================
procedure xuli;
	var
		i , j : longint;
	begin
		sang;
		kq := 0;
		for i := 2 to n div 2 do
			if nt[ i ] then
				for j := i + 1 to n div 2 do
					if nt[ j ] then
						if ( i * j <= n ) and ( i mod j <> 0 ) and ( j mod i <> 0 ) then
							inc( kq );
	end;
//===============================================
procedure xuat;
	var
		f : text;
	begin
		assign( f , '' );
		rewrite( f );
		writeln( f , kq );
		close( f );
	end;
//===============================================
begin
	nhap;
	xuli;
	xuat;
end.

const max_stepen=10;
var   n,res,length_simple,i,j : integer;
      simple : array [1..250] of integer;
procedure simple_generation;
var b:boolean;
        begin
        for i:=2 to (n div 2) do
                 begin
                 b:=true;
                 j:=3;
                 if (i mod 2=0) and (i<>2) then b:=false;
                 if b then while (sqr(j)<=i) do
                        if i mod j=0 then begin
                                          b:=false;
                                          break;
                                          end
                        else inc(j,2);
                 if b then begin
                           inc(length_simple);
                           simple[length_simple]:=i;
                           end;
                 end;
        end;
procedure almost_simple_generation;
var n1,n2,n1_max,n2_max:integer;
mas:array[1..250,1..10] of longint;
        begin
        n1_max:=max_stepen; n2_max:=max_stepen;
        for i:=1 to length_simple do mas[i,1]:=simple[i];
        for i:=1 to length_simple-1 do
                for j:=i+1 to length_simple do
                    begin
                        //for n1:=1 to n1_max do
                        n1:=1;
                        while (n1<=n1_max)  do begin
                                //for n2:=1 to n2_max do
                                n2:=1;
                                while (n2<=n2_max) do
                                        begin
                                        if mas[i,n1]=0 then mas[i,n1]:=mas[i,n1-1]*simple[i];
                                        if mas[j,n2]=0 then mas[j,n2]:=mas[j,n2-1]*simple[j];
                                        if mas[i,n1]>n then n1_max:=n1-1;
                                        if mas[j,n2]>n then n2_max:=n2-1;
                                        if mas[i,n1]*mas[j,n2]<=n then inc(res);
                                        inc(n2);
                                        end;
                        inc(n1);
                        end;
                    end;
        end;
BEGIN
read(n);
length_simple:=0; res:=0;
simple_generation;
almost_simple_generation;
write(res);
END.

Var t, n, res : integer;

Function Check(x : integer) : boolean;
Var i, count : integer;
Begin
    i := 1;
    count := 0;
    Repeat
        Repeat inc(i) Until x mod i = 0;
        inc(count);
        If count > 2 then break;
        Repeat x := x div i Until (x = 0) or (x mod i <> 0);
    Until x = 1;
    If count = 2 then Check := true else Check := false;
End;

BEGIN
    readln(n);
    For t := 2 to n do
        If Check(t) then inc(res);
    writeln(res);
END.

var n,k,i,p,j:longint;
begin
read(n);
p:=0;
k:=0;
for i:=6 to n do
for j:=2 to n div 2 do begin
if (j=2) or (j=3) or (j=5) or (j=7) or (j=11) or (j=13) or (j=17) or (j=19) or (j=23) or (j=29)then begin
if (i mod j=0) then inc(k);
end;
if (j mod 2<>0) and (j mod 3<>0) and (j mod 5<>0) and (j mod 7<>0) and (j mod 11<>0)
and (j mod 13<>0) and (j mod 17<>0) and (j mod 19<>0) and (j mod 23<>0) and (j mod 29<>0)then begin
if (i mod j=0) then inc(k);
end;
if j=n div 2 then begin
if k=2 then inc(p);
k:=0;
end;
end;
write(p);
end.

var n,k,i,p,j:longint;
begin
read(n);
p:=0;
k:=0;
for i:=6 to n do
for j:=2 to n do begin
if (j=2) or (j=3) or (j=5) or (j=7) or (j=11) or (j=13) or (j=17) or (j=19) then begin
if (i mod j=0) then inc(k);
end;
if (j mod 2<>0) and (j mod 3<>0) and (j mod 5<>0) and (j mod 7<>0) and (j mod 11<>0)
and (j mod 13<>0) and (j mod 17<>0) and (j mod 19<>0) then begin
if (i mod j=0) then inc(k);
end;
if j=n then begin
if k=2 then inc(p);
k:=0;
end;
end;
write(p);
end.

var n,k,i,p:longint;
begin
read(n);
p:=0;
k:=0;
for i:=1 to n do begin
if (i mod 2=0) then inc(k);
if (i mod 3=0) then inc(k);
if (i mod 5=0) then inc(k);
if (i mod 7=0) then inc(k);
if k=2 then inc(p);
k:=0;
end;
write(p);
end.

var n,k,i,p,j:longint;
begin
read(n);
p:=0;
k:=0;
for i:=6 to n do
for j:=2 to n div 2 do begin
if (j=2) or (j=3) or (j=5) or (j=7) or (j=11) or (j=13) or (j=17) or (j=19) then begin
if (i mod j=0) then inc(k);
end;
if (j mod 2<>0) and (j mod 3<>0) and (j mod 5<>0) and (j mod 7<>0) and (j mod 11<>0)
and (j mod 13<>0) and (j mod 17<>0) and (j mod 19<>0) then begin
if (i mod j=0) then inc(k);
end;
if j=n div 2 then begin
if k=2 then inc(p);
k:=0;
end;
end;
write(p);
end.

var n,k,i,p:longint;
begin
read(n);
p:=0;
k:=0;
for i:=1 to n do begin
if (i mod 2=0) then inc(k);
if (i mod 3=0) then inc(k);
if (i mod 5=0) then inc(k);
if (i mod 7=0) then inc(k);
if (i mod 11=0) then inc(k);
if (i mod 13=0) then inc(k);
if (i mod 17=0) then inc(k);
if (i mod 19=0) then inc(k);
if (i mod 23=0) then inc(k);
if (i mod 29=0) then inc(k);
if (i mod 31=0) then inc(k);
if (i mod 37=0) then inc(k);
if (i mod 41=0) then inc(k);
if (i mod 43=0) then inc(k);
if (i mod 47=0) then inc(k);
if (i mod 53=0) then inc(k);
if (i mod 59=0) then inc(k);
if (i mod 61=0) then inc(k);
if (i mod 67=0) then inc(k);
if (i mod 71=0) then inc(k);
if (i mod 73=0) then inc(k);
if (i mod 79=0) then inc(k);
if k=2 then inc(p);
k:=0;
end;
write(p);
end.

var
  n,i,j,x,y,m,anss,met,z:longint;
  a:array[1..4000] of longint;
  ans:array[1..100000] of longint;
begin
  readln(n);
  for i:=2 to 4000 do
    begin
      j:=i+i;
      if (a[i]=0) then begin
                         while (j<=n) do
                           begin
                             a[j]:=1;
                             j:=j+i;
                           end;
                       end;
    end;
  for i:=1 to 4000 do
    begin
      if (a[i]=0) then begin
                         inc(m);
                         ans[m]:=i;
                       end;
    end;
  for i:=6 to n do
    begin
      for j:=2 to trunc(sqrt(i)) do
        begin
          if (i mod j=0) and ((i div j)<>j) then begin

                                met:=0;
                                for z:=1 to m do
                                  begin
                                    if (ans[z]=j) then begin
                                                       met:=1;
                                                       break;
                                                     end;
                                  end;
                                if (met=1) then begin
                                                  met:=0;
                                                  for z:=1 to m do
                                                    begin
                                                      if (ans[z]=(i div j)) then begin
                                                                                met:=1;
                                                                                break;
                                                                               end;
                                                    end;
                                                  if (met=1) then inc(anss);
                                                end;

                              end;
        end;
    end;
  writeln(anss);
end.

var
  del,ch,n,i,j,x,y,m,anss,met,z:longint;
  a:array[1..4000] of longint;
  ans:array[1..100000] of longint;
begin
  readln(n);
  for i:=2 to 4000 do
    begin
      j:=i+i;
      if (a[i]=0) then begin
                         while (j<=n) do
                           begin
                             a[j]:=1;
                             j:=j+i;
                           end;
                       end;
    end;
  for i:=1 to 4000 do
    begin
      if (a[i]=0) then begin
                         inc(m);
                         ans[m]:=i;
                       end;
    end;
  for i:=6 to n do
    begin
     j:=2;
     ch:=i;
     del:=0;
     met:=0;
     while (ch mod 2)=0 do
       begin
         ch:=ch div 2;
         met:=1
       end;
     if met=1 then inc(del);
     for j:=3 to m do
       begin
         if (ch mod ans[j])=0 then begin
                                     inc(del);
                                     ch:=ch div ans[j];
                                     if (del>=2) then begin
                                     inc(anss);
                                 //    writeln(i);
                                     break;
                                                      end;
                                   end;
       end;

    end;
  writeln(anss);
end.

 var i,n,k,z,kol,j:longint;
begin
 readln(n);
 k:=0;
 for i:=6 to n do begin
   z:=i;
   kol:=0;
   for j:=2 to round(sqrt(i)) do
     if z mod j = 0 then begin
       inc(kol);
       while z mod j = 0 do
         z:=z div j;
       if kol>2 then break;
       if z=1 then break;
     end;
   if kol=2 then
     inc(k);
 end;
 writeln(k);
end.

 var i,n,k,z,kol,j:longint;
begin
 readln(n);
 k:=0;
 for i:=6 to n do begin
   z:=i;
   kol:=0;
   for j:=2 to (round(sqrt(i))+1) do
     if z mod j = 0 then begin
       inc(kol);
       while z mod j = 0 do
         z:=z div j;
       if kol>2 then break;
       if z=1 then break;
     end;
   if kol=2 then
     inc(k);
 end;
 writeln(k);
end.

var
  c, f, q, l, n, i, j, s, t, m, k: longint;
  a: array[0..10000] of longint;

procedure solve;
var k: longint;
begin
  k := 1;
  while (a[k] < l) and (a[k] <> 0) do begin
      if l mod a[k] = 0 then  begin
        inc(c);
      end;
      if c = 2 then begin
        inc(s);
        exit;
      end;
      inc(k);
  end;
end;

begin
  read(n);
    for i := 1 to n do begin
      q := round(sqrt(i));
      for j := 1 to q do
        if i mod j = 0 then
          inc(c);
      if (c = 1) and (i <> 1) then begin
        inc(t);
        a[t] := i;
      end;
      c := 0;
    end;
      for l := 1 to n do begin
        solve;
        c := 0;
      end;
  write(s);
end.

var
  c, f, q, l, n, i, j, s, t, m, k: longint;
  a: array[1..10000] of longint;

procedure solve;
var i, j: longint;
begin
  for k := 1 to t do begin
      if l mod a[k] = 0 then  begin
        inc(c);
      end;
      if c = 2 then begin
        inc(s);
        exit;
      end;
  end;
end;

begin
  read(n);
    for i := 1 to n do begin
      q := round(sqrt(i));
      for j := 1 to q do
        if i mod j = 0 then
          inc(c);
      if (c = 1) and (i <> 1) then begin
        inc(t);
        a[t] := i;
      end;
      c := 0;
    end;
      for l := 1 to n do begin
        solve;
        c := 0;
      end;
  write(s);
end.

var k,n,i:longint;

  function check(i:longint):boolean;
    var x:longint;
      begin
        x:=2;
        while x*x<=i do
         begin
           if i mod x=0  then
 begin
while i mod x=0 do i:=i div x;
break;
end;
inc(x);
end;
if i=1 then exit(false);
x:=2;
        while x*x<=i do
         begin
           if i mod x=0  then
 begin
while i mod x=0 do i:=i div x;
break;
end;
inc(x);
end;
exit(i=1);
end;
 begin
 readln(N);
for i:=1 to n do
 if check(i) then inc(k);
writeln(k);
end.

var
 a:array[0..3001] of longint;
 i,j,n,m,k:longint;
 b:boolean;
begin
readln(n);
m:=0;
for i:=2 to n do
 begin
  b:=true;
  for j:=2 to trunc(sqrt(i)) do
   if i mod j=0 then
    begin
     b:=false;
     break;
    end;
  if b then
   begin
    inc(m);
    a[m]:=i;
   end;
 end;
k:=0;
for i:=1 to m-1 do
 for j:=i+1 to m do
  if a[i]*a[j]<=n then inc(k);
write(k);
end.

var
 a:array[0..3001] of longint;
 i,j,n,m,k:longint;
 b:boolean;
begin
readln(n);
m:=0;
for i:=2 to n do
 begin
  b:=true;
  for j:=2 to trunc(sqrt(i)) do
   if i mod j=0 then
    begin
     b:=false;
     break;
    end;
  if b then
   begin
    inc(m);
    a[m]:=i;
   end;
 end;
k:=0;
for i:=1 to n-1 do
 for j:=i+1 to n do
  if a[i]*a[j]<=n then inc(k);
write(k);
end.

var
 n,i,j,k,s:longint;
 a,b:array[1..3000] of longint;
 f:boolean;
begin
 readln(n);
 k:=0;
 for i:=2 to sqr(n) do
 begin
   f:=false;
   for j:=1 to k do
   if i mod a[j]=0 then begin f:=true; break; end;
   if not f then begin
                 inc(k);
                 a[k]:=i;
                 for j:=1 to n do
                 begin
                 if j mod i=0 then
                              if  b[j]=1 then inc(S)
                                         else inc(b[j]);

                 end;
                 end;
 end;
 writeln(s);
 end.

var
 n,i,j,k,s:longint;
 a,b:array[1..3000] of longint;
 f:boolean;
begin
 readln(n);
 k:=0;
 for i:=2 to sqr(n) do
 begin
   f:=false;
   for j:=1 to k do
   if i mod a[j]=0 then begin f:=true; break; end;
   if not f then begin
                 inc(k);
                 a[k]:=i;
                 for j:=1 to n do
                 if j mod i=0 then inc(b[j]);
                 end;
                 end;
 for i:=1 to n do
 if b[i]=2 then inc(s);
 writeln(s);
 end.

var p: array of boolean; b: boolean; i,j,n,k,m,l: integer;
begin
  readln(n);
  setlength(p,n);
  for i:=2 to n do if not p[i] then
  begin
    j:=i*2;
    while j<=n do
    begin
      p[j]:=true;
      j:=j+i
    end
  end;
  for i:=2 to n do p[i]:=not p[i];
  i:=2;
  l:=trunc(sqrt(n));
  while i<l do
  begin
    i:=i+1;
    if p[i] then
    begin
      m:=n div i;
      for j:=2 to m do if p[j] then k:=k+1
    end
  end;
  writeln(k)
end.

var i,n:integer;
    x,k,j,max,l,sl:integer;kt:boolean;
	a:array[1..10000] of integer;
    c:array[1..10000] of integer;
begin
	a[1]:=2;
	k:=1;
	for i:=3 to 3000 do
    if i mod 2 <> 0 then
	begin
		kt:=false;
		for j:=2 to trunc(sqrt(i)) do
        if i mod j =0 then kt:=true;
			if kt=false then
			begin
					inc(k);
					a[k]:=i;
			end;
	end;
    for i:=2 to 3000 do
    begin
        l:=0;
        for j:=1 to k do
        begin
            if a[j]>i then break;
            if i mod a[j] =0 then inc(l);
            if l=2 then c[i]:=1;
        end;
    end;
        sl:=0;
        readln(n);
            for i:=1 to n do
            if c[i]=1 then inc(sl);
            writeln(sl);
readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n,d,m,v: integer;
    i,j,k,l: longint;
    a: array [1..2000] of integer;
begin
  read(n);
  k := 0;
  for i := 1 to 1500 do a[i] := 0;
  a[1] := 1;
  for i := 2 to 2500 do
        if a[i] = 0 then
                begin
                        j := i + i;
                        while j <= 1500 do
                                begin
                                        a[j] := 1;
                                        INC(j,i);
                                end;
                end;
  l := 0;
  for i := 2 to n do
  begin
      k := 0;
     for j := 1 to n DIV 2+1 do
        if (a[j] = 0) and (i MOD j = 0) then INC(k);
        if k = 2 then INC(l);
  end;
        write(l);
end.

{$R+ Q+ I+}
{$APPTYPE CONSOLE}
uses
  SysUtils;
var
    status : array[1..3000] of boolean;
    a : array[1..430] of integer;
procedure add(var n : integer);
var
   i,j: integer;
begin
     i := 2;
     while sqr(i) <= 3000 do begin
           if status[i] = false then begin
              j := sqr(i);
              while j <= 3000 do begin
                    if status[j] = false then status[j] := true;
                    inc(j,i);
              end;
           end;
           inc(i);
     end;
     n := 0;
     for i := 2 to 3000 do
         if status[i] = false then begin
            inc(n);
            a[n] := i;
         end;
end;
var
   i,j,n,kol,m,ans: integer;
begin
     n := 0;
     add(n);
     ans := 0;
     read(m);
     for i := 1 to m do begin
         kol := 0;
         for j := 1 to n do begin
             if a[j] > i then break;
             if i mod a[j] = 0 then inc(kol);
         end;
         if kol >= 2 then inc(ans);
     end;
     write(ans);

end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
Var
  n,i,j,ind, ind2:integer;
  a:array[1..3014] of integer;
begin
  readln(n);
  ind:=0;
  ind2:=1;
  for i:= 2 to 27600 do
    begin
      for j:=2 to i-1 do
        begin
          if i mod j=0 then
            ind:=1;
        end;
      if ind=1 then
        begin
          ind:=0;
        end
      else
        begin
          ind:=0;
          a[ind2]:=i;
          ind2:=ind2+1;
        end;
    end;
  writeln(ind2);
  readln;
  ind:=0;
  ind2:=0;
  for j:=3 to n do
    begin
      for i:= 1 to n div 2 do
        begin
          if j mod a[i]=0 then
          ind:=ind+1;
        end;
      if ind=2 then
        begin
          ind2:=ind2+1;
        end;
      ind:=0;
    end;
  writeln(ind2);
  readln;
end.

var n,i,j,m,amount,k:word; a:array[1..3000] of boolean; tg:dword;
    b:array[1..430] of word;
begin
        read(n);
        fillchar(a,sizeof(a),true);
        a[1]:=false; tg:=n shr 1;
        for i:=2 to tg do
        if a[i] then
        begin
                inc(m);
                b[m]:=i;
                for j:=2 to n div i do a[i*j]:=false
        end;
        amount:=0;
        for i:=1 to m do
        for j:=1 to i-1 do
        begin
                tg:=b[i]*b[j];
                if tg>n then break
                else begin
                        k:=0;
                        repeat
                                inc(k);
                                if tg*k<=n then inc(amount)
                        until tg*k>n
                end
        end;
        write(amount)
end.

var n,i,j,m,amount,k:word; a:array[1..3000] of boolean; tg:dword;
    b:array[1..430] of word;
begin
        read(n);
        fillchar(a,sizeof(a),true);
        a[1]:=false; tg:=n shr 1;
        for i:=2 to tg do
        if a[i] then
        begin
                inc(m);
                b[m]:=i;
                for j:=2 to n div i do a[i*j]:=false
        end;
        amount:=0;
        for i:=1 to m do
        for j:=1 to i-1 do
        begin
                tg:=b[i]*b[j];
                if tg>n then break
                else begin
                        k:=0;
                        repeat
                                inc(k);
                                if (not a[k] or (a[k] and (k in [b[i],b[j]]))) and (tg*k<=n) then inc(amount)
                        until tg*k>n
                end
        end;
        write(amount)
end.

var
          dau:array[1..3000] of boolean;
          nt:array[1..3000] of longint;
          n,k,kq,i,j:longint;
function check(x:longint):boolean;
var
          i:longint;
begin
          check:=true;
          for i:=2 to trunc(sqrt(x)) do
                    if x mod i = 0 then exit(false);
end;
begin
          readln(n);
          k:=0;
          for i:=2 to n do
                    if check(i)=true then
                    begin
                              inc(k);
                              nt[k]:=i;
                    end;
          kq:=0;
          for i:=1 to k-1 do
          begin
                    if nt[i]>n div 2 then break;
                    for j:=i+1 to k do
                              if nt[i]*nt[j]<=n then kq:=kq+n div (nt[i]*nt[j])
                              else break;
          end;
          writeln(kq);
end.

var
          dau:array[0..3000] of boolean;
          nt:array[0..3000] of longint;
          n,k,kq,i,j,m,x:longint;
function check(x:longint):boolean;
var
          i:longint;
begin
          check:=true;
          for i:=2 to trunc(sqrt(x)) do
                    if x mod i = 0 then exit(false);
end;
function tknp(x,l,r:longint):longint;
var
          mid:longint;
begin
          tknp:=0;
          repeat
                    mid:=(l+r) div 2;
                    if x>nt[mid] then
                    begin
                              tknp:=mid;
                              l:=mid+1;
                    end
                    else if x=nt[mid] then exit(mid)
                    else r:=mid-1;
          until l>r;
end;
begin
          readln(n);
          k:=0;
          for i:=2 to n do
                    if check(i)=true then
                    begin
                              inc(k);
                              nt[k]:=i;
                    end;
          kq:=0;
          for i:=1 to k-1 do
          begin
                    if nt[i]>n div 2 then break;
                    for j:=i+1 to k do
                              if nt[i]*nt[j]<=n then
                              begin
                                        m:=n div (nt[i]*nt[j]);
                                        x:=tknp(m,1,k);
                                        if nt[x]>=nt[i] then inc(m);
                                        if nt[x]>=nt[j] then inc(m);
                                        m:=m-x;
                                        kq:=kq+m;
                              end
                              else break;
          end;
          writeln(kq);
end.

var fi,fo: text;
    i,n: word;
    prime:array[1..3000] of word;
    dem: word;
{--------------------------------}
procedure phantich(num: word);
var kt_ngto:array[1..3000] of boolean;
    u,m: word;
begin
    m:=num; u:=2;   prime[num]:=0;
    fillchar(kt_ngto, sizeof(kt_ngto), false);
    repeat
        while num mod u <>0 do
            inc(u);
        if kt_ngto[u]=false then
        begin
            kt_ngto[u]:=true;
            inc(prime[m]);
        end;
        num:= num div u;
    until num=1;
end;
{--------------------------------}
procedure process;
begin
    dem:=0;
    readln(fi,n);
    for i:=6 to n do
    begin
        phantich(i);
        if prime[i]>=2 then inc(dem);
    end;
    writeln(fo,dem);
end;
{--------------------------------}
begin
    assign(fi,'');   reset(fi);
    assign(fo,'');   rewrite(fo);
        process;
    close(fi);  close(fo);
end.