#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 *, ...);
scalar_t__ scanf(char *, unsigned long long *);
main() {
  unsigned long long k;
  while (scanf("%llu", &k) > 0) {
    if (k != 1)
      printf("%llu471\n", k - 1);
    else
      printf("471\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
jle    1182 <main+0x62>
cmpq   $0x1,-0x10(%rbp)
je     116f <main+0x4f>
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117d <main+0x5d>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
test   %rax,%rax
jle    11a2 <main+0x72>
lea    0xebb(%rip),%r14
lea    0xea6(%rip),%r15
mov    %rsp,%rbx
lea    0xea1(%rip),%r12
jmp    1188 <main+0x58>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
test   %rax,%rax
jle    11a2 <main+0x72>
mov    (%rsp),%rsi
cmp    $0x1,%rsi
je     1170 <main+0x40>
add    $0xffffffffffffffff,%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1178 <main+0x48>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [9 x i8] c"%llu471\0A\00"
@.str.2 = [5 x i8] c"471\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
br label %3
3: ; preds = %15, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i64, i64* %2
%8 = icmp ne i64 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i64, i64* %2
%11 = sub i64 %10, 1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %11)
br label %15
13: ; preds = %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [9 x i8] c"%llu471\0A\00"
@str = [4 x i8] c"471\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %16
5: ; preds = %0, %13
%6 = load i64, i64* %1
%7 = icmp eq i64 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = add i64 %6, -1
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %9)
br label %13
11: ; preds = %5
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%15 = icmp sgt i64 %14, 0
br i1 %15, label %5, label %16
16: ; preds = %13, %0
ret i32 0
}