import java.util.*
import kotlin.Comparator


data class Point(val x: Double, val y: Double) {
    operator fun minus(that: Point): Point = Point(x - that.x, y - that.y)
}

class Line private constructor(private val a: Double, private val b: Double, private val c:Double) {//ax + by + c == 0
    fun crossPoint(that: Line): Point? {
        return if (isParallel(that)) null else Point((b * that.c - c * that.b) / (a * that.b - b * that.a), (c * that.a - a * that.c) / (a * that.b - b * that.a))
    }
    fun isParallel(that: Line): Boolean = a * that.b == b * that.a
    companion object{
        operator fun invoke(a: Point, b: Point): Line {
            val diff = a - b
            return if (diff.x < 0) Line(diff.y, -diff.x, b.y * a.x - a.y * b.x) else Line(-diff.y, diff.x, a.y * b.x - a.x * b.y)
        }
    }
}
data class Angle(val sin: Double, val cos: Double) {
    private val degree = (if (cos >= 0) Math.acos(sin) else Math.PI * 2 - Math.acos(sin)).let{it * 180 / Math.PI}
    fun clockwiseDegree(): Double = degree
}
data class LineWithDirection(val from: Point, val to: Point) {
    private val line = Line(from, to)
    private val vec = Vector(from, to)
    fun angle(): Angle = vec.angle
    fun isParallel(that: LineWithDirection): Boolean = line.isParallel(that.line)
    fun crossPoint(that: LineWithDirection): Point? = line.crossPoint(that.line)
    fun isRightSide(point: Point): Boolean = vec.cross(Vector(from, point)) < 0
    fun isVertical(): Boolean = from.x == to.x
}
data class Vector(val x: Double, val y: Double) {
    constructor(from: Point, to: Point):this(to.x - from.x, to.y - from.y)
    val angle = Angle(y / Math.sqrt(x * x + y * y), x / Math.sqrt(x * x + y * y))
    fun cross(that: Vector): Double = x * that.y - y * that.x
}
object Clockwise: Comparator<Angle> {
    override fun compare(o1: Angle, o2: Angle): Int = o1.clockwiseDegree().compareTo(o2.clockwiseDegree())
}
object ClockwiseEdge: Comparator<LineWithDirection> {
    override fun compare(o1: LineWithDirection, o2: LineWithDirection): Int = Clockwise.compare(o1.angle(), o2.angle())
}
data class Triangle(val a: Point, val b: Point, val c: Point) {
    fun clockwiseEdges(): List<LineWithDirection> = listOf(LineWithDirection(a, c), LineWithDirection(c, b), LineWithDirection(b, a))
}
fun sanitize(deque: Deque<LineWithDirection>): Unit {
    while(deque.size >= 2) {
        val third = deque.pollLast()
        val second = deque.pollLast()
        if (third.isParallel(second)) {
            if (third.isRightSide(second.from)) {
                deque.addLast(second)
                break
            }else {
                deque.addLast(third)
            }
        }else if (deque.isNotEmpty()) {
            val first = deque.last
            val st = second.crossPoint(third)!!
            if (first.isRightSide(st)) {
                deque.addLast(second)
                deque.addLast(third)
                break
            }else {
                deque.addLast(third)
            }
        }else {
            deque.addLast(second)
            deque.addLast(third)
            break
        }
    }
}


fun convex(triangles: List<Triangle>): List<LineWithDirection> {
    val edges = triangles.flatMap(Triangle::clockwiseEdges).sortedWith(ClockwiseEdge)
    val deque: Deque<LineWithDirection> = ArrayDeque<LineWithDirection>()
    for (e in edges) {
        deque.addLast(e)
        sanitize(deque)
    }
    var size = deque.size
    deque.addLast(deque.pollFirst())
    sanitize(deque)
    deque.addLast(deque.pollFirst())
    sanitize(deque)
    while(size > deque.size) {
        size = deque.size
        deque.addLast(deque.pollFirst())
        sanitize(deque)
    }
    return deque.toList()
}

fun calculateArea(triangles: List<Triangle>): Double {
    val edges = convex(triangles)
    if (edges.size <= 2) return 0.0
    val start = edges.first().crossPoint(edges.last())!!
    var current = start
    var result = 0.0
    for ((a, b) in edges.zipWithNext()) {
        val cp = a.crossPoint(b)!!
        result += (cp.y + current.y) * (cp.x - current.x) / 2
        current = cp
    }
    if (!edges.last().isVertical()) {
        result += (current.y + start.y) * (start.x - current.x) / 2
    }
    return result
}
operator fun <T> List<T>.component6(): T = this[5]
fun <T> List<T>.zipWithNext(): List<Pair<T, T>> {
    return (1 until size).map{Pair(this[it - 1], this[it])}
}
fun main(args: Array<String>?): Unit {
    val n = readLine()!!.trim().toInt()
    val triangles = List(n){
        val (a, b, c, d, e, f) = readLine()!!.trim().split(' ').map(String::toDouble)
        Triangle(Point(a, b), Point(c, d), Point(e, f))
    }
    println(
            java.lang.String.format("%.10f", calculateArea(triangles))
    )
}


Measured memory_bytes: 160484