include Math

points = $<.readlines.map {|l| Complex(*l.split(",").map(&:to_f))}
start_po = p0 = points.sort_by(&:imaginary).last
prev_arg = PI
  
e = Enumerator.new do |y|
  loop do
    points -= [start_po]
    break if points.empty?
    selected = points.map {|po| [po - start_po, po]}
      .reject {|pos| pos.first == 0}
      .sort_by {|pos| a = pos.first.angle + PI - prev_arg; a >= 0 ? a : a + 2 * PI}
      .first.last
    y << selected
    prev_arg = (selected - start_po).angle + PI
    start_po = selected
  end
end

result = e.each_cons(2).map do |p1, p2|
  a = (p1 - p0).abs
  b = (p2 - p0).abs
  c = (p2 - p1).abs
  z = (a + b + c) / 2.0
  sqrt(z * (z - a) * (z - b) * (z - c))
end.sum
puts result
