#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char const *argv[]) {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  int A, B, H, num_giorni = 0;
  scanf("%d %d %d", &A, &B, &H);
  H = H - A;
  A = A - B;
  for (int i = 0; i < H; i += A) {
    num_giorni++;
  }
  printf("%d\n", ++num_giorni);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rdi
lea    0xead(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edx
lea    0xe9a(%rip),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <freopen@plt>
movl   $0x0,-0x20(%rbp)
lea    0xe8d(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x1c(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11d9 <main+0xa9>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11b6 <main+0x86>
mov    -0x20(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x20(%rbp)
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
lea    0xeac(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1040 <freopen@plt>
lea    0xea6(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x10(%rsp),%ecx
sub    %ecx,%eax
mov    %eax,0xc(%rsp)
sub    0x14(%rsp),%ecx
mov    %ecx,0x10(%rsp)
test   %eax,%eax
jle    11c1 <main+0x91>
cmp    %eax,%ecx
cmovg  %ecx,%eax
add    $0xffffffff,%eax
xor    %edx,%edx
div    %ecx
lea    0x1(%rax),%edx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    11c8 <main+0x98>
mov    $0x1,%esi
jmp    11dc <main+0xac>
mov    $0x1,%esi
jmp    11f9 <main+0xc9>
and    $0xfffffff8,%edx
mov    $0x1,%eax
lea    0x8(%rax),%esi
add    $0x7,%eax
cmp    %edx,%eax
mov    %esi,%eax
jne    11d0 <main+0xa0>
test   %ecx,%ecx
je     11f9 <main+0xc9>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%eax
cmp    %ecx,%eax
jne    11f0 <main+0xc0>
add    %eax,%esi
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [9 x i8] c"%d %d %d\00"
@.str.5 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* @stdin
%12 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stdout
%14 = call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %13)
store i32 0, i32* %9
%15 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
store i32 %18, i32* %8
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = sub nsw i32 %19, %20
store i32 %21, i32* %6
store i32 0, i32* %10
br label %22
22: ; preds = %29, %2
%23 = load i32, i32* %10
%24 = load i32, i32* %8
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %33
26: ; preds = %22
%27 = load i32, i32* %9
%28 = add nsw i32 %27, 1
store i32 %28, i32* %9
br label %29
29: ; preds = %26
%30 = load i32, i32* %6
%31 = load i32, i32* %10
%32 = add nsw i32 %31, %30
store i32 %32, i32* %10
br label %22
33: ; preds = %22
%34 = load i32, i32* %9
%35 = add nsw i32 %34, 1
store i32 %35, i32* %9
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [9 x i8] c"%d %d %d\00"
@.str.5 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = load i32, i32* @stdin
%7 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = tail call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%14 = load i32, i32* %5
%15 = load i32, i32* %3
%16 = sub i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %4
%18 = sub i32 %15, %17
store i32 %18, i32* %3
%19 = icmp sgt i32 %16, 0
br i1 %19, label %20, label %39
20: ; preds = %2
%21 = call i32 @llvm.smax.i32(i32 %18, i32 %16)
%22 = add nsw i32 %21, -1
%23 = udiv i32 %22, %18
%24 = add i32 %23, 1
%25 = and i32 %24, 7
%26 = icmp ult i32 %23, 7
br i1 %26, label %29, label %27
27: ; preds = %20
%28 = and i32 %24, -8
br label %42
29: ; preds = %42, %20
%30 = phi i32 [ undef, %20 ], [ %45, %42 ]
%31 = phi i32 [ 1, %20 ], [ %45, %42 ]
%32 = icmp eq i32 %25, 0
br i1 %32, label %39, label %33
33: ; preds = %29, %33
%34 = phi i32 [ %36, %33 ], [ %31, %29 ]
%35 = phi i32 [ %37, %33 ], [ 0, %29 ]
%36 = add i32 %34, 1
%37 = add i32 %35, 1
%38 = icmp eq i32 %37, %25
br i1 %38, label %39, label %33
39: ; preds = %29, %33, %2
%40 = phi i32 [ 1, %2 ], [ %30, %29 ], [ %36, %33 ]
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %40)
ret i32 0
42: ; preds = %42, %27
%43 = phi i32 [ 1, %27 ], [ %45, %42 ]
%44 = phi i32 [ 0, %27 ], [ %46, %42 ]
%45 = add i32 %43, 8
%46 = add i32 %44, 8
%47 = icmp eq i32 %46, %28
br i1 %47, label %29, label %42
}