import numpy as np
import matplotlib.pyplot as plt

input_path = "input"
with open(input_path) as infile:
    txt = infile.read()
    data = [int(v) for v in txt.split(",")]


print(int(np.sum(np.abs(data - np.round(np.median(data))))))

e00cbef225b5e24514b9dba6c08e0fdfcde1a705
<mask token>

<mask token>
with open(input_path) as infile:
    txt = infile.read()
    data = [int(v) for v in txt.split(',')]
print(int(np.sum(np.abs(data - np.round(np.median(data))))))

<mask token>
input_path = 'input'
with open(input_path) as infile:
    txt = infile.read()
    data = [int(v) for v in txt.split(',')]
print(int(np.sum(np.abs(data - np.round(np.median(data))))))

import numpy as np
import matplotlib.pyplot as plt
input_path = 'input'
with open(input_path) as infile:
    txt = infile.read()
    data = [int(v) for v in txt.split(',')]
print(int(np.sum(np.abs(data - np.round(np.median(data))))))

import numpy as np
import matplotlib.pyplot as plt

input_path = "input"
with open(input_path) as infile:
    txt = infile.read()
    data = [int(v) for v in txt.split(",")]


print(int(np.sum(np.abs(data - np.round(np.median(data))))))
