#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;
  scanf("%d", &n);
  if (n == 2)
    printf("28 days\n");
  else if ((n < 8 && n % 2 == 0) || (n > 8 && n % 2 == 1))
    printf("30 days\n");
  else
    printf("31 days\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    115a <main+0x3a>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    11b8 <main+0x98>
cmpl   $0x8,-0x8(%rbp)
jge    1178 <main+0x58>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1196 <main+0x76>
cmpl   $0x8,-0x8(%rbp)
jle    11a7 <main+0x87>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11a7 <main+0x87>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
jmp    11b3 <main+0x93>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
jmp    11b8 <main+0x98>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    1144 <main+0x24>
lea    0xed1(%rip),%rdi
jmp    1183 <main+0x63>
cmp    $0x7,%eax
jg     1159 <main+0x39>
mov    %eax,%ecx
and    $0x1,%ecx
jne    1159 <main+0x39>
lea    0xeb4(%rip),%rdi
jmp    1183 <main+0x63>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
lea    0xe9a(%rip),%rdi
lea    0xe8b(%rip),%rcx
cmovne %rcx,%rdi
cmp    $0x9,%eax
cmovl  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [8 x i8] c"31 days\00"
@str.4 = [8 x i8] c"30 days\00"
@str.5 = [8 x i8] c"28 days\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
%5 = icmp eq i32 %4, 2
br i1 %5, label %17, label %6
6: ; preds = %0
%7 = icmp slt i32 %4, 8
%8 = and i32 %4, 1
%9 = icmp eq i32 %8, 0
%10 = and i1 %7, %9
br i1 %10, label %17, label %11
11: ; preds = %6
%12 = icmp sgt i32 %4, 8
%13 = srem i32 %4, 2
%14 = icmp eq i32 %13, 1
%15 = and i1 %12, %14
%16 = select i1 %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
br label %17
17: ; preds = %11, %6, %0
%18 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0), %0 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.4, i64 0, i64 0), %6 ], [ %16, %11 ]
%19 = call i32 @puts(i8* dereferenceable(1) %18)
ret i32 0
}