{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eBowen is now traveling in Province A and found many beautiful scenic spots here. It is a paradise for Bowen! So he decided to settle in Province A for a while.\u003c/p\u003e\n\u003cp\u003eThere are n cities in province A. There is only one path between any two cities, and m of them have beautiful scenic spots. If the distance from a city to all scenic spots is no more than d, then Bowen considers this city to be the perfect city, Bowen will be staying in the city for a while.\u003c/p\u003e\n\u003cp\u003eBowen want to know how many perfect cities there are? Can you help him? \u003c/p\u003e\n"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line has three positive integers $n$, $m$ and $d$ $(1 \\leq m \\leq n \\leq 100000;0 \\leq d \\leq n-1)$.\u003c/p\u003e\n\u003cp\u003eThe second row has $m$ numbers $p_1, p_2, ..., p_m (1 \\leq p_i \\leq n)$, represents the number of the $m$ cities. \u003c/p\u003e\n\u003cp\u003eNext there are n-1 lines, two numbers per line $u_i, v_i (1 \\leq u_i, v_i \\leq n)$, represents an undirected road from $u_i$ to $v_i$ , the length of it is 1.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"Print a number, the number of perfect cities."}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6 2 3\n1 2\n1 5\n2 3\n3 4\n4 5\n5 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e3, 4, 5 are perfect cities.\u003c/p\u003e"}}]}