import csv
import sys

def subtract_first_item(csv_file):
    with open(csv_file, 'r') as file:
        reader = csv.reader(file, delimiter=' ')
        data = list(reader)

    # Extract the first item in the first line
    first_item = int(data[0][0])

    # Subtract the first item from all other items in the first column
    for row in data[0:]:
        row[0] = str(int(row[0]) - first_item)

    # Write the modified data to a new CSV file
    with open('modified_' + csv_file, 'w', newline='') as file:
        writer = csv.writer(file)
        writer.writerows(data)

csv_file = sys.argv[1]  # first argument is the csv-file
subtract_first_item(csv_file)
