{"raw_statement":[{"iden":"problem statement","content":"Given is a tree with $N$ vertices. The vertices are numbered $1$ through $N$, and the $i$\\-th edge connects Vertex $A_i$ and Vertex $B_i$.\nFind the number of pairs of integers $(x,y)$ that satisfy the following conditions.\n\n*   $0 \\leq x \\leq N$.\n    \n*   There is a way to choose exactly $x$ vertices from the tree so that the sum of their degrees equals $y$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq A_i < B_i \\leq N$\n*   All values 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$\\vdots$\n$A_{N-1}$ $B_{N-1}$"},{"iden":"sample input 1","content":"3\n1 2\n2 3"},{"iden":"sample output 1","content":"6\n\nThe following six pairs $(x,y)$ satisfy the conditions.\n\n*   $x=0,y=0$\n*   $x=1,y=1$\n*   $x=1,y=2$\n*   $x=2,y=2$\n*   $x=2,y=3$\n*   $x=3,y=4$\n\n$x=2,y=3$, for example, satisfies the condition because choosing Vertex $1$ and Vertex $2$ achieves the total degree of $3$."},{"iden":"sample input 2","content":"5\n1 2\n2 3\n2 4\n4 5"},{"iden":"sample output 2","content":"16"},{"iden":"sample input 3","content":"10\n2 9\n8 10\n2 10\n4 6\n5 6\n1 8\n2 7\n3 6\n6 8"},{"iden":"sample output 3","content":"65"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}