#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *, int *);
int main() {
  int N, K, year;
  double price = 200;
  while (scanf("%d%d", &N, &K) != EOF) {
    price = 200;
    for (year = 1; year <= 20; year++) {
      if (N * year >= price) {
        printf("%d\n", year);
        break;
      } else if (year == 20 && N * year < price)
        printf("Impossible\n");
      price *= (1 + K / 100.0);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
je     121b <main+0xfb>
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jg     1216 <main+0xf6>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     11aa <main+0x8a>
mov    -0x10(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
cmpl   $0x14,-0x10(%rbp)
jne    11dc <main+0xbc>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11dc <main+0xbc>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe22(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe0e(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <main+0x54>
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed3(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x2e8d(%rip),%r14
cmp    (%r14),%rax
jne    1171 <main+0x41>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebp
movsd  0xe82(%rip),%xmm1
lea    0xe93(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%rbx
lea    0xe87(%rip),%r13
jmp    11cc <main+0x9c>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
movsd  0xe3e(%rip),%xmm1
mov    $0x1,%ebp
cmp    (%r14),%rax
je     1160 <main+0x30>
mov    0xc(%rsp),%eax
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm1,%xmm0
jae    11a0 <main+0x70>
cmp    $0x14,%ebp
jne    1203 <main+0xd3>
ucomisd %xmm0,%xmm1
jbe    1203 <main+0xd3>
lea    0xe2f(%rip),%rdi
movsd  %xmm1,0x10(%rsp)
call   1030 <puts@plt>
movsd  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
divsd  0xdf4(%rip),%xmm0
addsd  0xdf4(%rip),%xmm0
mulsd  %xmm0,%xmm1
add    $0x1,%ebp
cmp    $0x15,%ebp
jne    11cc <main+0x9c>
jmp    11ac <main+0x7c>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [12 x i8] c"Impossible\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 0, i32* %1
store double 2.000000e+02, double* %5
br label %6
6: ; preds = %47, %0
%7 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %48
10: ; preds = %6
store double 2.000000e+02, double* %5
store i32 1, i32* %4
br label %11
11: ; preds = %44, %10
%12 = load i32, i32* %4
%13 = icmp sle i32 %12, 20
br i1 %13, label %14, label %47
14: ; preds = %11
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = mul nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = load double, double* %5
%20 = fcmp oge double %18, %19
br i1 %20, label %21, label %24
21: ; preds = %14
%22 = load i32, i32* %4
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %47
24: ; preds = %14
%25 = load i32, i32* %4
%26 = icmp eq i32 %25, 20
br i1 %26, label %27, label %36
27: ; preds = %24
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = mul nsw i32 %28, %29
%31 = sitofp i32 %30 to double
%32 = load double, double* %5
%33 = fcmp olt double %31, %32
br i1 %33, label %34, label %36
34: ; preds = %27
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34, %27, %24
br label %37
37: ; preds = %36
%38 = load i32, i32* %3
%39 = sitofp i32 %38 to double
%40 = fdiv double %39, 1.000000e+02
%41 = fadd double 1.000000e+00, %40
%42 = load double, double* %5
%43 = fmul double %42, %41
store double %43, double* %5
br label %44
44: ; preds = %37
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %11
47: ; preds = %21, %11
br label %6
48: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [11 x i8] c"Impossible\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %38, label %8
8: ; preds = %0, %31
%9 = phi double [ %32, %31 ], [ 2.000000e+02, %0 ]
%10 = phi i32 [ %33, %31 ], [ 1, %0 ]
%11 = load i32, i32* %1
%12 = mul nsw i32 %11, %10
%13 = sitofp i32 %12 to double
%14 = fcmp ugt double %9, %13
br i1 %14, label %17, label %15
15: ; preds = %8
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %34
17: ; preds = %8
%18 = icmp eq i32 %10, 20
%19 = fcmp ogt double %9, %13
%20 = select i1 %18, i1 %19, i1 false
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %23
23: ; preds = %17, %21
%24 = load i32, i32* %2
%25 = sitofp i32 %24 to double
%26 = fdiv double %25, 1.000000e+02
%27 = fadd double %26, 1.000000e+00
%28 = fmul double %9, %27
%29 = add nuw nsw i32 %10, 1
%30 = icmp eq i32 %29, 21
br i1 %30, label %34, label %31
31: ; preds = %23, %34
%32 = phi double [ %28, %23 ], [ 2.000000e+02, %34 ]
%33 = phi i32 [ %29, %23 ], [ 1, %34 ]
br label %8
34: ; preds = %23, %15
%35 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%36 = load i64, i64* @EOF
%37 = icmp eq i64 %35, %36
br i1 %37, label %38, label %31
38: ; preds = %34, %0
ret i32 0
}