// Enter your code here var arr: [Double] = [] if let line = readLine() { for chr in line.characters { if chr != " " { arr.append(Double(String(chr)) ?? 0) } } } var sum = 0.5*arr[0]*arr[2] + 0.5*arr[1]*arr[2] sum = sum % (10*10*10*10*10*10*10*10*10 + 7) print(Int(sum))