{"raw_statement":[{"iden":"problem statement","content":"You are given a simple undirected graph with $N$ vertices and $M$ edges. The vertices are numbered $1$ to $N$, and the $i$\\-th edge connects vertex $A_i$ and vertex $B_i$. Let us delete zero or more edges to remove cycles from the graph. Find the minimum number of edges that must be deleted for this purpose.\n\nWhat is a simple undirected graph? **A simple undirected graph** is a graph without self-loops or multi-edges whose edges have no direction.\n\nWhat is a cycle? A **cycle** in a simple undirected graph is a sequence of vertices $(v_0, v_1, \\ldots, v_{n-1})$ of length at least $3$ satisfying $v_i \\neq v_j$ if $i \\neq j$ such that for each $0 \\leq i < n$, there is an edge between $v_i$ and $v_{i+1 \\bmod n}$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $0 \\leq M \\leq 2 \\times 10^5$\n*   $1 \\leq A_i, B_i \\leq N$\n*   The given graph is simple.\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$\\vdots$\n$A_M$ $B_M$"},{"iden":"sample input 1","content":"6 7\n1 2\n1 3\n2 3\n4 2\n6 5\n4 6\n4 5"},{"iden":"sample output 1","content":"2\n\nOne way to remove cycles from the graph is to delete the two edges between vertex $1$ and vertex $2$ and between vertex $4$ and vertex $5$.  \nThere is no way to remove cycles from the graph by deleting one or fewer edges, so you should print $2$."},{"iden":"sample input 2","content":"4 2\n1 2\n3 4"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"5 3\n1 2\n1 3\n2 3"},{"iden":"sample output 3","content":"1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}