#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int i, a, b, sum = 0;
  for (i = 0; i < 12; i++) {
    scanf("%d.%d", &a, &b);
    sum += 100 * a + b;
  }
  sum = (sum + 6) / 12;
  printf("$%d.%d\n", sum / 100, sum % 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jge    1176 <main+0x56>
lea    0xeb2(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
imul   $0x64,-0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
mov    -0x14(%rbp),%eax
add    $0x6,%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%r12
lea    0x4(%rsp),%r14
mov    %rsp,%r15
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%ebx
add    (%rsp),%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %eax,%ebx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
imul   $0x64,0x4(%rsp),%eax
add    (%rsp),%ebx
add    %ebx,%eax
add    $0x6,%eax
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
imul   $0x1b4e81b5,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x27,%rsi
add    %eax,%esi
movslq %ecx,%rdx
imul   $0x51eb851f,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%edx
lea    0xd61(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d.%d\00"
@.str.1 = [8 x i8] c"$%d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %2
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 12
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%11 = load i32, i32* %3
%12 = mul nsw i32 100, %11
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %15, %14
store i32 %16, i32* %5
br label %17
17: ; preds = %9
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %6
20: ; preds = %6
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 6
%23 = sdiv i32 %22, 12
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = sdiv i32 %24, 100
%26 = load i32, i32* %5
%27 = srem i32 %26, 100
%28 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d.%d\00"
@.str.1 = [8 x i8] c"$%d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = mul nsw i32 %6, 100
%8 = load i32, i32* %2
%9 = add i32 %8, %7
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%11 = load i32, i32* %1
%12 = mul nsw i32 %11, 100
%13 = load i32, i32* %2
%14 = add i32 %13, %9
%15 = add i32 %14, %12
%16 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%17 = load i32, i32* %1
%18 = mul nsw i32 %17, 100
%19 = load i32, i32* %2
%20 = add i32 %19, %15
%21 = add i32 %20, %18
%22 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%23 = load i32, i32* %1
%24 = mul nsw i32 %23, 100
%25 = load i32, i32* %2
%26 = add i32 %25, %21
%27 = add i32 %26, %24
%28 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%29 = load i32, i32* %1
%30 = mul nsw i32 %29, 100
%31 = load i32, i32* %2
%32 = add i32 %31, %27
%33 = add i32 %32, %30
%34 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%35 = load i32, i32* %1
%36 = mul nsw i32 %35, 100
%37 = load i32, i32* %2
%38 = add i32 %37, %33
%39 = add i32 %38, %36
%40 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%41 = load i32, i32* %1
%42 = mul nsw i32 %41, 100
%43 = load i32, i32* %2
%44 = add i32 %43, %39
%45 = add i32 %44, %42
%46 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%47 = load i32, i32* %1
%48 = mul nsw i32 %47, 100
%49 = load i32, i32* %2
%50 = add i32 %49, %45
%51 = add i32 %50, %48
%52 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%53 = load i32, i32* %1
%54 = mul nsw i32 %53, 100
%55 = load i32, i32* %2
%56 = add i32 %55, %51
%57 = add i32 %56, %54
%58 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%59 = load i32, i32* %1
%60 = mul nsw i32 %59, 100
%61 = load i32, i32* %2
%62 = add i32 %61, %57
%63 = add i32 %62, %60
%64 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%65 = load i32, i32* %1
%66 = mul nsw i32 %65, 100
%67 = load i32, i32* %2
%68 = add i32 %67, %63
%69 = add i32 %68, %66
%70 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%71 = load i32, i32* %1
%72 = mul nsw i32 %71, 100
%73 = load i32, i32* %2
%74 = add i32 %73, %69
%75 = add i32 %74, %72
%76 = add nsw i32 %75, 6
%77 = sdiv i32 %76, 12
%78 = sdiv i32 %76, 1200
%79 = srem i32 %77, 100
%80 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %78, i32 %79)
ret i32 0
}