#!/usr/bin/env python3
import csv
import sys
from decimal import Decimal


def main() -> int:
    if len(sys.argv) != 2:
        return 1

    total = Decimal("0")

    with open(sys.argv[1], newline="", encoding="utf-8") as f:
        reader = csv.DictReader(f)
        for row in reader:
            total += Decimal(row["price"])

    print(total)
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
