Reduce voltage after AC-DC rectification before step-down
Ofcourse the best solution would be to find the right IC but if you want the easy way then yes, you can use diodes to drop voltage and additionaly you could use series PTC and zener to ground for protection against overvoltage. Common values for zener are 33 or 36.
There are hundreds of bucks with input rated >= 40V cheaper then 1$ so I`d go for it, especially as your fan does not take so much power to use LM2596 sorts which are more expensive and 2-3A+.