{"raw_statement":[{"iden":"problem statement","content":"We have $N$ cards numbered $1$ to $N$. Each side of each card has a color represented by a positive integer.\nOne side of Card $i$ has a color $a_i$, and the other side has a color $b_i$.\nFor each card, you can choose which side shows up. Find the maximum possible number of different colors showing up."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 200000$\n*   $1 \\leq a_i,b_i \\leq 400000$\n*   All numbers in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$a_1$ $b_1$\n$a_2$ $b_2$\n$:$\n$a_N$ $b_N$"},{"iden":"sample input 1","content":"4\n1 2\n1 3\n4 2\n2 3"},{"iden":"sample output 1","content":"4\n\nWe can choose the sides with $1$, $3$, $4$, $2$ to have four colors."},{"iden":"sample input 2","content":"2\n111 111\n111 111"},{"iden":"sample output 2","content":"1\n\nThey are painted with just one color."},{"iden":"sample input 3","content":"12\n5 2\n5 6\n1 2\n9 7\n2 7\n5 5\n4 2\n6 7\n2 2\n7 8\n9 7\n1 8"},{"iden":"sample output 3","content":"8"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}