#coding:utf-8 lamp = 55 lot = 0 get = input() get = get.split(" ") for x in range(0,9): rot = get[x] rot = int(rot) lot += rot print(abs(lamp - lot))