{"raw_statement":[{"iden":"statement","content":"_Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement._\n\nLittle Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfolds on the night of Lunar New Year's eve.\n\nA wonder strikes Tommy. How many regions are formed by the circles on the sky? We consider the sky as a flat plane. A region is a connected part of the plane with positive area, whose bound consists of parts of bounds of the circles and is a curve or several curves without self-intersections, and that does not contain any curve other than its boundaries. Note that exactly one of the regions extends infinitely."},{"iden":"input","content":"The first line of input contains one integer _n_ (1 ≤ _n_ ≤ 3), denoting the number of circles.\n\nThe following _n_ lines each contains three space-separated integers _x_, _y_ and _r_ ( - 10 ≤ _x_, _y_ ≤ 10, 1 ≤ _r_ ≤ 10), describing a circle whose center is (_x_, _y_) and the radius is _r_. No two circles have the same _x_, _y_ and _r_ at the same time."},{"iden":"output","content":"Print a single integer — the number of regions on the plane."},{"iden":"examples","content":"Input\n\n3\n0 0 1\n2 0 1\n4 0 1\n\nOutput\n\n4\n\nInput\n\n3\n0 0 2\n3 0 2\n6 0 2\n\nOutput\n\n6\n\nInput\n\n3\n0 0 2\n2 0 2\n1 1 2\n\nOutput\n\n8"},{"iden":"note","content":"For the first example,\n\n<center>![image](https://espresso.codeforces.com/e6a24b8a7f19e3f3a0fb7c5e7eafb89db446afc0.png)</center>For the second example,\n\n<center>![image](https://espresso.codeforces.com/0e3f1931fa9c6c77a8be15a43f427dfc683bd90b.png)</center>For the third example,\n\n<center>![image](https://espresso.codeforces.com/793579ed08c4b41c8e0bc7e5aa0face8808882de.png)</center>"}],"translated_statement":[{"iden":"statement","content":"鞭炮能吓跑年兽，但它们实在太吵了！也许烟花是更好的选择。\n\n小汤米正在观看一场烟花表演。当圆形图案在夜空中绽放时，农历新年前夜的天空展现出一幅壮丽的画卷。\n\n汤米产生了一个疑问：天空中的这些圆形成了多少个区域？我们将天空视为一个平面。一个区域是平面上一个连通的、面积为正的部分，其边界由圆的边界的一部分构成，是一条或若干条无自交的曲线，且不包含任何其他曲线。注意，恰好有一个区域是无限延伸的。\n\n输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 3])，表示圆的数量。\n\n接下来的 #cf_span[n] 行，每行包含三个用空格分隔的整数 #cf_span[x]、#cf_span[y] 和 #cf_span[r] (#cf_span[ - 10 ≤ x, y ≤ 10]，#cf_span[1 ≤ r ≤ 10])，描述一个圆心为 #cf_span[(x, y)]、半径为 #cf_span[r] 的圆。任意两个圆的 #cf_span[x]、#cf_span[y] 和 #cf_span[r] 不会完全相同。\n\n请输出一个整数——平面上的区域数量。\n\n对于第一个示例，\n\n对于第二个示例，\n\n对于第三个示例，\n\n"},{"iden":"input","content":"输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 3])，表示圆的数量。接下来的 #cf_span[n] 行，每行包含三个用空格分隔的整数 #cf_span[x]、#cf_span[y] 和 #cf_span[r] (#cf_span[ - 10 ≤ x, y ≤ 10]，#cf_span[1 ≤ r ≤ 10])，描述一个圆心为 #cf_span[(x, y)]、半径为 #cf_span[r] 的圆。任意两个圆的 #cf_span[x]、#cf_span[y] 和 #cf_span[r] 不会完全相同。"},{"iden":"output","content":"请输出一个整数——平面上的区域数量。"},{"iden":"examples","content":"输入\n3\n0 0 1\n2 0 1\n4 0 1\n输出\n4\n\n输入\n3\n0 0 2\n3 0 2\n6 0 2\n输出\n6\n\n输入\n3\n0 0 2\n2 0 2\n1 1 2\n输出\n8"},{"iden":"note","content":"对于第一个示例，对于第二个示例，对于第三个示例，"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of circles, with $ 1 \\leq n \\leq 3 $.  \nFor each $ i \\in \\{1, \\dots, n\\} $, let $ C_i $ be a circle defined by center $ (x_i, y_i) \\in \\mathbb{R}^2 $ and radius $ r_i \\in \\mathbb{R}^+ $, with $ -10 \\leq x_i, y_i \\leq 10 $, $ 1 \\leq r_i \\leq 10 $, and all $ (x_i, y_i, r_i) $ distinct.\n\n**Constraints**  \nNo two circles are identical.\n\n**Objective**  \nCompute the number of connected regions $ R $ into which the plane is divided by the union of the circles $ \\bigcup_{i=1}^n C_i $, where each region is a maximal connected open set with boundary composed of arcs of the circles and no other curves.","simple_statement":null,"has_page_source":false}