Nanodroplets on rough hydrophilic and hydrophobic surfaces