The Wiener index of odd graphs