For obtaining 31 zeros at last of the number, 31 powers of 5 is necessary. Product 1*2*3*4*5 upto 125
contain 5, 10 ,15 . 125. These 25 numbers are multiple of 5, besides it 25, 50, 75, 100, 125 contain a second 5 and 125 contains a third 5 hence total number of 5 = 25+5+1 = 31