For every integer $n \geq 2$, we denote by $f(n)$ the largest integer $m$ for which the following statement is true: "In the plane, no matter how $n$ lines are given, one can select $m$ of them such that among these $m$, any two are either parallel or any two intersect each other."

Determine the function $f(n)$!
For a given integer $n \geq 2$, let $k$ be the natural number for which

$$
(k-1)^{2}<n \leq k^{2}
$$

holds, that is, $k^{2}$ is the smallest square number not less than $n$. We will show that $f(n)=k$. The proof consists of two steps according to the definition of $f(n)$.

First, we show that $k$ can be chosen as $m$, that is, $k \leq f(n)$. Let $e_{1}, e_{2}, \ldots, e_{n}$ be any $n$ lines in the plane. If there are $k$ parallel lines among them, remove those. If not, step by step remove one line at a time such that the new line is not parallel to any previously selected line. Thus, we can remove at least $k$ lines, since according to our assumption, each selected line can be parallel to at most $k-2$ other lines. Therefore, if we add to any $k-1$ lines the lines parallel to them, we still get at most $(k-1)^{2}$ lines, and by (1), we have more than that.

Second, we show that no number $m$ larger than $k$ can have the stated property. Let $e_{1}, e_{2}, \ldots, e_{k}$ be any $k$ lines in the plane, none of which are parallel to each other. (For example, the $k$ consecutive sides of a regular $2k$-sided polygon.) Draw $k-1$ more lines parallel to each of them. Thus, by (1), we get at least $n$ lines, and no matter how we choose more than $k$ lines from these, at least two of them will be parallel, since otherwise we could only choose one line from each set of lines parallel to $e_{1}, e_{2}, \ldots, e_{k}$, and that would be at most $k$ lines.

Károlyi Gyula (Budapest, Ságvári E. Gyak. Isk. 8. o. t.)