A man rows upstream a distance of 9 km or downstream a distance of 18 km taking 3 hours each time. The speed of the boat in still water is