#import <stdio.h>
#import <stdlib.h>
int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}
int main(){
    int A[3];
    scanf("%d",A);
    scanf("%d",A+1);
    scanf("%d",A+2);
    qsort(A, 3, sizeof(int), compare_int);
    int z = 0;
    int a = A[1]-A[0];
    int b = A[2]-A[0];
    int r = a%2;
    int s = b%2;
    int result = 0;
    if (r==1 && s==0) {
        z++;
        b++;
        result++;
    }
    if (r==0 && s==1) {
        z++;
        a++;
        result++;
    }
    if (r==1 && s==1) {
        a++;
        b++;
        result++;
    }
    result += (b-z)/2 + (b-a)/2;
    printf("%d",result);
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_567/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_567/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @compare_int(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 {
entry:
  %0 = load i32, ptr %a, align 4, !tbaa !5
  %1 = load i32, ptr %b, align 4, !tbaa !5
  %sub = sub nsw i32 %0, %1
  ret i32 %sub
}

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
  %A = alloca [3 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %A) #5
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A)
  %add.ptr = getelementptr inbounds i32, ptr %A, i64 1
  %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr)
  %add.ptr4 = getelementptr inbounds i32, ptr %A, i64 2
  %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr4)
  call void @qsort(ptr noundef nonnull %A, i64 noundef 3, i64 noundef 4, ptr noundef nonnull @compare_int) #5
  %0 = load i32, ptr %add.ptr, align 4, !tbaa !5
  %1 = load i32, ptr %A, align 4, !tbaa !5
  %sub = sub nsw i32 %0, %1
  %2 = load i32, ptr %add.ptr4, align 4, !tbaa !5
  %sub10 = sub nsw i32 %2, %1
  %rem = srem i32 %sub, 2
  %rem11 = srem i32 %sub10, 2
  %cmp = icmp eq i32 %rem, 1
  %cmp12 = icmp eq i32 %rem11, 0
  %or.cond = and i1 %cmp, %cmp12
  %inc13 = zext i1 %or.cond to i32
  %spec.select = add nsw i32 %sub10, %inc13
  %cmp15 = icmp eq i32 %rem, 0
  %cmp17 = icmp eq i32 %rem11, 1
  %or.cond36 = and i1 %cmp15, %cmp17
  %inc19 = select i1 %or.cond, i32 2, i32 1
  %inc20.neg57 = sext i1 %or.cond36 to i32
  %z.1 = select i1 %or.cond36, i32 %inc19, i32 %inc13
  %or.cond37 = and i1 %cmp, %cmp17
  %inc28 = zext i1 %or.cond37 to i32
  %b.1 = add nsw i32 %spec.select, %inc28
  %inc27.neg56 = sext i1 %or.cond37 to i32
  %sub31 = sub nsw i32 %b.1, %z.1
  %div = sdiv i32 %sub31, 2
  %a.0.neg = sub i32 %inc20.neg57, %sub
  %a.1.neg = add i32 %a.0.neg, %inc27.neg56
  %sub32 = add i32 %a.1.neg, %b.1
  %div33 = sdiv i32 %sub32, 2
  %add = add nuw nsw i32 %z.1, %inc28
  %result.2 = add nsw i32 %add, %div33
  %add34 = add i32 %result.2, %div
  %call35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add34)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %A) #5
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
