#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,i,j=0;
	cin>>n;
	for(i=1900;i<=n;i++){
		if(i%4==0&&i%100!=0||i%400==0) j++;
	}	
	cout<<j;
}
/**************************************************************
	Problem: 1749
	User: linzihang
	Language: C++
	Result: Accepted
	Time:9 ms
	Memory:2072 kb
****************************************************************/