using C=System.Console;class P{static void Main(){int c,n=0;for(;(c=C.Read())>0;n+=c/42);C.Write(n);}}