/* Figure out the number of 0s at the end of n! 
 * Note that 999! is

402387260077093773543702433923003985719374864210714632543799910429938512398\
    62902059204420848696940480047998861019719605863166687299480855890132382\
    96699445909974245040870737599188236277271887325197795059509952761208749\
    75462497043601418278094646496291056393887437886487337119181045825783647\
    84997701247663288983595573543251318532395846307555740911426241747434934\
    75534286465766116677973966688202912073791438537195882498081268678383745\
    59731746136085379534524221586593201928090878297308431392844403281231558\
    61103697680135730421616874760967587134831202547858932076716913244842623\
    61314125087802080002616831510273418279777047846358681701643650241536913\
    98281264810213092761244896359928705114964975419909342221566832572080821\
    33318611681155361583654698404670897560290095053761647584772842188967964\
    62449451607653534081989013854424879849599533191017233555566021394503997\
    36280750137837615307127761926849034352625200015888535147331611702103968\
    17592151090778801939317811419454525722386554146106289218796022383897147\
    60885062768629671466746975629112340824392081601537808898939645182632436\
    71616762179168909779911903754031274622289988005195444414282012187361745\
    99264295658174662830295557029902432415318161721046583203678690611726015\
    87835207515162842255402651704833042261439742869330616908979684825901254\
    58327168226458066526769958652682272807075781391858178889652208164348344\
    82599326604336766017699961283186078838615027946595513115655203609398818\
    06121385586003014356945272242063446317974605946825731037900840244324384\
    65657245014402821885252470935190620929023136493273497565513958720559654\
    22874977401141334696271542284586237738753823048386568897646192738381490\
    01407673104466402598994902222217659043399018860185665264850617997023561\
    93897017860040811889729918311021171229845901641921068884387121855646124\
    96079872290851929681937238864261483965738229112312502418664935314397013\
    74285319266498753372189406942814341185201580141233448280150513996942901\
    53483077644569099073152433278288269864602789864321139083506217095002597\
    38986355427719674282224875758676575234422020757363056949882508796892816\
    27538488633969099598262809561214509948717012445164612603790293091208890\
    86942028510640182154399457156805941872748998094254742173582401063677404\
    59574178516082923013535808184009699637252423056085590370062427124341690\
    90041536901059339838357779394109700277534720000000000000000000000000000\
    00000000000000000000000000000000000000000000000000000000000000000000000\
    00000000000000000000000000000000000000000000000000000000000000000000000\
    00000000000000000000000000000000000000000000000000000000000000000000000\
    00000
*/
public class Num0s {
	public static void main(String [] args){
		try {
			int n=Integer.parseInt(args[0]);
			System.out.println(num0s(n));
		} catch (NumberFormatException e){
			System.out.println("That was not a number");
		}
	}

	// Figure out the number of 5s that divide n!
	static int num0s(int n){
		int j=0;
		while(n>0){
			n=n/5;
			j=j+n;
		}
		return(j);
	}
}
