#include<stdio.h>
int isprime(int n){
int i,ans=1;
for (i=2; i*i<=n && ans==1; i++){
if(n%i==0){
ans=0;
}else{
ans=1;
}
}
return ans;
}
int main(){
int cnt=0;
int N;
scanf("%d",&N);
for (int i=3; (i+2)<=N; i++){
if(isprime(i) && isprime(i+2)){
cnt++;
}
}printf("%d",cnt);
return 0;
}
10-10
09-03
1071
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-21