so the idea here is that N=[N/5]+[N/25]+[N/125]+....[N/5^huge number]

N is the given number, [x] indicates the greatest integer not exceeding x and [N/5^huge number] indicating the [] value at that point = 0 (so that [N/5^huge number-1]=1)

here is the naive solution

```
int trailingZeroes(int n) {
if(n<5)
return 0;
else if(n<10)
return 1;
else if(n<15)
return 2;
else{
n=n/5;
return n+ trailingZeroes(n);
}
}
```