Desks

Report a typo

The school has decided to create three new math groups and equip classrooms with new desks. There is a place for exactly two people at every desk. So, no more than two students can occupy a desk. We know how many students are in each group. Output the smallest number of desks that the school needs to buy. Each group sits in a separate classroom.

Input data format

The program receives three non-negative integers — the number of students in each of three classes (the numbers do not exceed 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 Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic