{"raw_statement":[{"iden":"statement","content":"Ahmad has two rectangles, both of them are above $x -a x i s$ and the height of each one is $h$ $(1 <= h <= 10^9)$.\n\nThe first rectangle's sides are $(x_1, 0)$ $(x_2, 0)$ $(x_1, h)$ $(x_2, h)$\n\nThe second rectangle's sides are $(x_3, 0)$ $(x_4, 0)$ $(x_3, h)$ $(x_4, h)$\n\nAhmad wants to know what is the area of the intersection between these two rectangles.\n\nThe first and the only line of input contains 5 integers $x_1$,$x_2$,$x_3$,$x_4$ and $h$ \n\n$(1 <= x_1 < x_2 <= 10^9)$ $(1 <= x_3 < x_4 <= 10^9)$ $(1 <= h <= 10^9)$.\n\nPrint the area of intersection.\n\n"},{"iden":"input","content":"The first and the only line of input contains 5 integers $x_1$,$x_2$,$x_3$,$x_4$ and $h$ $(1 <= x_1 < x_2 <= 10^9)$ $(1 <= x_3 < x_4 <= 10^9)$ $(1 <= h <= 10^9)$."},{"iden":"output","content":"Print the area of intersection."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ x_1, x_2, x_3, x_4, h \\in \\mathbb{Z} $ be given integers such that:  \n- $ 1 \\le x_1 < x_2 \\le 10^9 $  \n- $ 1 \\le x_3 < x_4 \\le 10^9 $  \n- $ 1 \\le h \\le 10^9 $  \n\nLet $ R_1 = [x_1, x_2] \\times [0, h] $ and $ R_2 = [x_3, x_4] \\times [0, h] $ be two axis-aligned rectangles.\n\n**Objective**  \nCompute the area of the intersection $ R_1 \\cap R_2 $:  \n$$\n\\text{Area} = h \\cdot \\max(0, \\min(x_2, x_4) - \\max(x_1, x_3))\n$$","simple_statement":"Two rectangles, both with height h, have bases on the x-axis from x1 to x2 and x3 to x4. Find the area where they overlap.","has_page_source":false}