#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int round(int);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double a, b, c;
  scanf("%lf %lf %lf", &a, &b, &c);
  printf("%.0lf\n%.0lf\n", round((a + b + c) / 3),
         round((round(a) + round(b) + round(c)) / 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <round@plt>
mov    %eax,-0x1c(%rbp)
cvttsd2si -0x8(%rbp),%edi
call   1050 <round@plt>
mov    %eax,-0x24(%rbp)
cvttsd2si -0x10(%rbp),%edi
call   1050 <round@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
cvttsd2si -0x18(%rbp),%edi
call   1050 <round@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <round@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xec9(%rip),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x18(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
divsd  0xe93(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <round@plt>
mov    %eax,%r14d
cvttsd2si 0x18(%rsp),%edi
call   1050 <round@plt>
mov    %eax,%ebp
cvttsd2si 0x10(%rsp),%edi
call   1050 <round@plt>
mov    %eax,%ebx
add    %ebp,%ebx
cvttsd2si 0x8(%rsp),%edi
call   1050 <round@plt>
add    %ebx,%eax
cltq
imul   $0x55555556,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
shr    $0x20,%rdi
add    %eax,%edi
call   1050 <round@plt>
lea    0xe50(%rip),%rdi
mov    %r14d,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [13 x i8] c"%.0lf\0A%.0lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%5 = load double, double* %1
%6 = load double, double* %2
%7 = fadd double %5, %6
%8 = load double, double* %3
%9 = fadd double %7, %8
%10 = fdiv double %9, 3.000000e+00
%11 = fptosi double %10 to i32
%12 = call i32 @round(i32 %11)
%13 = load double, double* %1
%14 = fptosi double %13 to i32
%15 = call i32 @round(i32 %14)
%16 = load double, double* %2
%17 = fptosi double %16 to i32
%18 = call i32 @round(i32 %17)
%19 = add nsw i32 %15, %18
%20 = load double, double* %3
%21 = fptosi double %20 to i32
%22 = call i32 @round(i32 %21)
%23 = add nsw i32 %19, %22
%24 = sdiv i32 %23, 3
%25 = call i32 @round(i32 %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [13 x i8] c"%.0lf\0A%.0lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = load double, double* %2
%10 = fadd double %8, %9
%11 = load double, double* %3
%12 = fadd double %10, %11
%13 = fdiv double %12, 3.000000e+00
%14 = fptosi double %13 to i32
%15 = call i32 @round(i32 %14)
%16 = load double, double* %1
%17 = fptosi double %16 to i32
%18 = call i32 @round(i32 %17)
%19 = load double, double* %2
%20 = fptosi double %19 to i32
%21 = call i32 @round(i32 %20)
%22 = add nsw i32 %21, %18
%23 = load double, double* %3
%24 = fptosi double %23 to i32
%25 = call i32 @round(i32 %24)
%26 = add nsw i32 %22, %25
%27 = sdiv i32 %26, 3
%28 = call i32 @round(i32 %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %28)
ret i32 0
}