#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, i;
  float avg, sum;
  scanf("%d", &n);
  sum = 0;
  i = 0;
  do {
    sum = sum + n % 10;
    n = n / 10;
    i++;
  } while (n / 10 != 0);
  avg = sum / i;
  if (avg < 7) {
    printf("light");
  } else
    printf("heavy");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    114e <main+0x2e>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe4f(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11cc <main+0xac>
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
xor    %eax,%eax
mov    0x4(%rsp),%ecx
nopl   0x0(%rax,%rax,1)
movslq %ecx,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rcx
add    %esi,%ecx
lea    (%rcx,%rcx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edx,%edi
sub    %esi,%edi
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
addss  %xmm1,%xmm0
add    $0x1,%eax
add    $0x63,%edx
cmp    $0xc6,%edx
ja     1140 <main+0x20>
mov    %ecx,0x4(%rsp)
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  0xe6f(%rip),%xmm1
ucomiss %xmm0,%xmm1
lea    0xe6c(%rip),%rax
lea    0xe6b(%rip),%rdi
cmova  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"light\00"
@.str.2 = [6 x i8] c"heavy\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store float 0.000000e+00, float* %5
store i32 0, i32* %3
br label %7
7: ; preds = %17, %0
%8 = load float, float* %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 10
%11 = sitofp i32 %10 to float
%12 = fadd float %8, %11
store float %12, float* %5
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
store i32 %14, i32* %2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %17
17: ; preds = %7
%18 = load i32, i32* %2
%19 = sdiv i32 %18, 10
%20 = icmp ne i32 %19, 0
br i1 %20, label %7, label %21
21: ; preds = %17
%22 = load float, float* %5
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to float
%25 = fdiv float %22, %24
store float %25, float* %4
%26 = load float, float* %4
%27 = fcmp olt float %26, 7.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %21
%29 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %32
30: ; preds = %21
%31 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"light\00"
@.str.2 = [6 x i8] c"heavy\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
br label %5
5: ; preds = %5, %0
%6 = phi i32 [ %4, %0 ], [ %12, %5 ]
%7 = phi i32 [ 0, %0 ], [ %13, %5 ]
%8 = phi float [ 0.000000e+00, %0 ], [ %11, %5 ]
%9 = srem i32 %6, 10
%10 = sitofp i32 %9 to float
%11 = fadd float %8, %10
%12 = sdiv i32 %6, 10
%13 = add nuw nsw i32 %7, 1
%14 = add i32 %6, 99
%15 = icmp ult i32 %14, 199
br i1 %15, label %16, label %5
16: ; preds = %5
store i32 %12, i32* %1
%17 = sitofp i32 %13 to float
%18 = fdiv float %11, %17
%19 = fcmp olt float %18, 7.000000e+00
%20 = select i1 %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%21 = call i32 @printf(i8* dereferenceable(1) %20)
ret i32 0
}