Kattis Challenge "Sum of Others"

Problem

My solution

 1import java.util.Scanner;
 2public class SumOfOthers {
 3    public static void main(String[] args) {
 4        Scanner sc = new Scanner(System.in);
 5        while (sc.hasNext()) {
 6            String[] temp = sc.nextLine().split(" ");
 7            int answer = 0;
 8            for (int i = 0; i < temp.length; i++) {
 9                answer += Integer.parseInt(temp[i]);
10            }
11            System.out.println(answer/2);
12        }
13    }
14}