n=int(input())+1 C=[p:=1]*n while~p+n: i=p=p+1 while i0];i+=p print(C.count(5))