#include<iostream> int main(){ int a,i=1,g=0; scanf("%d",&a); while(i<=a){ if(i%3==2&&i%5==3&&i%7==2){ g++; } i++; } return 0; }