g, t, n = map(int, input().split()) w = map(int, input().split()) print(int((g - t) * 0.9 - sum(w)))