using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string[] t = s.Split(' '); int m = 0; for (int i = 0;i< 9; i++) { m += int.Parse(t[i]); } m = 55 - m; Console.WriteLine("{0}",m); Console.ReadLine(); } } }