题目 

#include<iostream>
using namespace std;
int main() {
	int n;
	cin>>n;//容斥定理
	cout<<n/2+n/3+n/5+n/30-n/6-n/15-n/10+1<<endl;
	return 0;
}