#(zeros)= # pairs of 5's and 2's in 2018!
# 5's in 2018! = $\left \lfloor 2018/5 \right \rfloor + \left \lfloor 2018/25 \right \rfloor + \left \lfloor 2018/125 \right \rfloor + \left \lfloor 2018/625 \right \rfloor$ =502
Obviously # 2's > # 5's.
So, # pairs(No of trailing zeros) = 502 which is min(#5s,#2s)