import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class bj1676 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N, count = 0;
int i;
//5의 지수가 결과
N = Integer.parseInt(br.readLine());
for(i = 1; i <= N; i++)
{
if(i % 5 == 0)
{
if(i % 25 == 0)
{
if(i % 125 == 0)
{
count++;
}
count++;
}
count++;
}
}
System.out.println(count);
}
}