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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     114e <main+0x2e>
movss  -0x10(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  0xe5e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11bc <main+0x9c>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    11c8 <main+0xa8>
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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
add    $0x1,%eax
addss  %xmm1,%xmm0
cmp    $0x9,%edx
jg     1140 <main+0x20>
mov    %ecx,0x4(%rsp)
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
ucomiss 0xe76(%rip),%xmm0
lea    0xe76(%rip),%rax
lea    0xe75(%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"heavy\00"
@.str.2 = [6 x i8] c"light\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = 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* %4
store i32 0, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = load float, float* %4
%10 = load i32, i32* %2
%11 = srem i32 %10, 10
%12 = sitofp i32 %11 to float
%13 = fadd float %9, %12
store float %13, float* %4
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 10
store i32 %15, i32* %2
br label %16
16: ; preds = %6
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 0
br i1 %18, label %6, label %19
19: ; preds = %16
%20 = load float, float* %4
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
%23 = fdiv float %20, %22
%24 = fcmp ogt float %23, 7.000000e+00
br i1 %24, label %25, label %27
25: ; preds = %19
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %29
27: ; preds = %19
%28 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"heavy\00"
@.str.2 = [6 x i8] c"light\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 [ %13, %5 ], [ %4, %0 ]
%7 = phi i32 [ %9, %5 ], [ 0, %0 ]
%8 = phi float [ %12, %5 ], [ 0.000000e+00, %0 ]
%9 = add nuw nsw i32 %7, 1
%10 = srem i32 %6, 10
%11 = sitofp i32 %10 to float
%12 = fadd float %8, %11
%13 = sdiv i32 %6, 10
%14 = icmp sgt i32 %6, 9
br i1 %14, label %5, label %15
15: ; preds = %5
store i32 %13, i32* %1
%16 = sitofp i32 %9 to float
%17 = fdiv float %12, %16
%18 = fcmp ogt float %17, 7.000000e+00
%19 = select i1 %18, 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)
%20 = call i32 @printf(i8* dereferenceable(1) %19)
ret i32 0
}