Let n ≥ 2 be a natural number and f:[0,1)]\(\rightarrow\) R be the function defined by
\(f(x) \begin{cases} n(1-2nx)\ \ \ \ \ \ \ \ \ \text{if}\ 0\le x\le\frac{1}{2n} \\ 2n((2nx-1)\ \ \ \ \ \text{if}\ \frac{1}{2n}\le x\le \frac{3}{4n}\\4n(1-nx)\ \ \ \ \ \ \ \ \ \text{if}\ \frac{3}{4n}\le x\le\frac{1}{n} \\ \frac{n}{n-1}(nx-1)\ \ \ \ \ \ \ \text{if}\ \frac{1}{n}\le x\le1 \end{cases}\)
If n is such that the area of the region bounded by the curves x = 0, x = 1, y = 0 and y = f(x) is 4, then the maximum value of the function f is