A cube has side length \(n\), where \(n\) is a positive integer. Exactly three faces, which meet at a corner, are painted purple. The cube is then cut into \(n^3\) smaller cubes with side length \(1\). If exactly \(125\) of these smaller cubes have no faces painted purple, then determine the value of \(n\).