Desks

Report a typo

A university has decided to open math courses and equip classrooms for 3 groups with new special desks. The faculty agreed that for the sake of productivity, only two students may share one desk. The enrollment has ended and the university knows how many students are in each group. Now the task is to count the number of desks. Of course, the university is short of money, so you need to calculate the minimum number of desks required for each group. But don't forget that each group will sit in its own classroom!

Input data format

The program receives the input of three non-negative integers: the number of students in each of the three groups (the numbers are not bigger than 1000).

Sample Input 1:

20
21
22

Sample Output 1:

32

Sample Input 2:

16
18
20

Sample Output 2:

27
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// put your code here
}
}
___

Create a free account to access the full topic