#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);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int b, k, g, groups;
  scanf("%d %d %d", &b, &k, &g);
  printf("%d\n", (b - 1) % (groups = k / g) == 0 ? (b - 1) / groups
                                                 : (b - 1) / groups + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
mov    %ecx,-0x14(%rbp)
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117d <main+0x5d>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x1c(%rbp)
jmp    118d <main+0x6d>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x14(%rbp)
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%ecx
add    $0xffffffff,%ecx
mov    0x10(%rsp),%eax
cltd
idivl  0xc(%rsp)
mov    %eax,%esi
mov    %ecx,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
sbb    $0xffffffff,%eax
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
%13 = srem i32 %9, %12
%14 = icmp ne i32 %13, 0
%15 = sdiv i32 %9, %12
%16 = zext i1 %14 to i32
%17 = add nsw i32 %15, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
ret i32 0
}