import java.util.*; import java.awt.Point; /* _____ | | b| | | _ _ |_____ | | a| | | |___________| c d */ public class Surveillance_AN { // region inside ad public static double compute(double a, double b, double c, double d) { if (b * d < a * c) { // parabola gets truncated by right wall double y = (-(c / b) + Math.sqrt((c / b) * (c / b - d / a))) / (c / (a * b)); double parabolaArea = (c / (a * b)) * (a * y * y + y * y * y / 3); double rectangleArea = d * (a + y); return parabolaArea + rectangleArea; } else { // parabola fits entirely return (2 * a * a * c) / (3 * b); } } public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); double answer = 0; TreeSet x = new TreeSet<>(); TreeSet y = new TreeSet<>(); if (n == 4) { for (int i = 0; i < n; i++) { x.add(s.nextInt()); y.add(s.nextInt()); } answer = (x.last() - x.first()) * (y.last() - y.first()); } else { ArrayList pts = new ArrayList<>(); for (int i = 0; i < n; i++) { Point pt = new Point(s.nextInt(), s.nextInt()); pts.add(pt); x.add(pt.x); y.add(pt.y); } // find kink Integer[] xSort = x.toArray(new Integer[3]); Integer[] ySort = y.toArray(new Integer[3]); int kinkIdx = pts.indexOf(new Point(xSort[1], ySort[1])); int afterIdx = (kinkIdx + 1) % 6; int a, b, c, d; if (pts.get(afterIdx).x == xSort[1]) { if (pts.get(afterIdx).y > ySort[1]) { // ▙ a = ySort[1] - ySort[0]; b = ySort[2] - ySort[1]; c = xSort[1] - xSort[0]; d = xSort[2] - xSort[1]; } else { // ▜ a = ySort[2] - ySort[1]; b = ySort[1] - ySort[0]; c = xSort[2] - xSort[1]; d = xSort[1] - xSort[0]; } } else { if (pts.get(afterIdx).x > xSort[1]) { // ▛ a = ySort[2] - ySort[1]; b = ySort[1] - ySort[0]; c = xSort[1] - xSort[0]; d = xSort[2] - xSort[1]; } else { // ▟ a = ySort[1] - ySort[0]; b = ySort[2] - ySort[1]; c = xSort[2] - xSort[1]; d = xSort[1] - xSort[0]; } } answer = a * c; answer += compute(a, b, c, d); answer += compute(c, d, a, b); } System.out.println(answer); } }