import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; struct point { real x, y, z; } void main() { auto n = readln.chomp.to!size_t; auto ai = iota(n + 1) .map!(_ => readln.split.map!(to!real)) .map!(rd => point(rd[0], rd[1], rd[2])).array; auto p = ai.front; auto qi = ai[1..$]; auto bi = new bool[](n); bi[3..$] = true; real s = 0; foreach (i; 0..n - 2) foreach (j; i + 1..n - 1) foreach (k; j + 1..n) s += calc(p, qi[i], qi[j], qi[k]); writefln("%.9f", s); } real calc(point p, point a, point b, point c) { auto d = (b.y - a.y) * (c.z - a.z) - (c.y - a.y) * (b.z - a.z); auto e = (b.z - a.z) * (c.x - a.x) - (c.z - a.z) * (b.x - a.x); auto f = (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y); auto g = -(d * a.x + e * a.y + f * a.z); return (d * p.x + e * p.y + f * p.z + g).abs / (d ^^ 2 + e ^^ 2 + f ^^ 2).sqrt; }