You get it from an old man in a house in route 23. It is the 2nd house you encounter when you enter from giant chasm and it requires surf. You go north up the path until you see some stairs and then you surf east and there is a house there in the northeast corner of the route.
Source: stategy guide