A fly is walking along the edges of a 3-inch cube. If it starts at a corner, what is the longest it could walk without retracing an edge?