#import <stdio.h>
typedef long long INT;
int main(){
    INT a,b,c;
    scanf("%lld %lld %lld",&a,&b,&c);
    INT A=2*a-b-c;
    INT B=2*b-c-a;
    INT C=2*c-a-b;
    if(a==b&&b==c) {
        if(a%2==0){
            puts("-1");
        }else{
            puts("0");
        }
        return 0;
    }else{
        INT i=0;
        while(A%2==0&&B%2==0&&C%2==0){
            i++;
            A/=2;
            B/=2;
            C/=2;
        }
        printf("%lld",i);
    }
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_790/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_790/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 [15 x i8] c"%lld %lld %lld\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"-1\00", align 1
@.str.2 = private unnamed_addr constant [2 x i8] c"0\00", align 1
@.str.3 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %a = alloca i64, align 8
  %b = alloca i64, align 8
  %c = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #3
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
  %0 = load i64, ptr %a, align 8, !tbaa !5
  %1 = load i64, ptr %b, align 8, !tbaa !5
  %2 = load i64, ptr %c, align 8, !tbaa !5
  %cmp = icmp eq i64 %0, %1
  %cmp8 = icmp eq i64 %1, %2
  %or.cond = select i1 %cmp, i1 %cmp8, i1 false
  br i1 %or.cond, label %if.then, label %while.cond.preheader

while.cond.preheader:                             ; preds = %entry
  %mul5 = shl nsw i64 %2, 1
  %3 = add i64 %1, %0
  %sub7 = sub i64 %mul5, %3
  %mul2 = shl nsw i64 %1, 1
  %4 = add i64 %2, %0
  %sub4 = sub i64 %mul2, %4
  %mul = shl nsw i64 %0, 1
  %5 = add i64 %1, %2
  %sub1 = sub i64 %mul, %5
  %6 = and i64 %sub1, 1
  %cmp1542 = icmp eq i64 %6, 0
  %7 = and i64 %sub4, 1
  %cmp1843 = icmp eq i64 %7, 0
  %or.cond3544 = select i1 %cmp1542, i1 %cmp1843, i1 false
  %8 = and i64 %sub7, 1
  %cmp2045 = icmp eq i64 %8, 0
  %or.cond3646 = select i1 %or.cond3544, i1 %cmp2045, i1 false
  br i1 %or.cond3646, label %while.body, label %while.end

if.then:                                          ; preds = %entry
  %9 = and i64 %0, 1
  %cmp9 = icmp eq i64 %9, 0
  br i1 %cmp9, label %if.then10, label %if.else

if.then10:                                        ; preds = %if.then
  %call11 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %cleanup

if.else:                                          ; preds = %if.then
  %call12 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %cleanup

while.body:                                       ; preds = %while.cond.preheader, %while.body
  %i.050 = phi i64 [ %inc, %while.body ], [ 0, %while.cond.preheader ]
  %C.049 = phi i64 [ %div22, %while.body ], [ %sub7, %while.cond.preheader ]
  %B.048 = phi i64 [ %div21, %while.body ], [ %sub4, %while.cond.preheader ]
  %A.047 = phi i64 [ %div, %while.body ], [ %sub1, %while.cond.preheader ]
  %inc = add nuw nsw i64 %i.050, 1
  %div = sdiv i64 %A.047, 2
  %div21 = sdiv i64 %B.048, 2
  %div22 = sdiv i64 %C.049, 2
  %10 = and i64 %div, 1
  %cmp15 = icmp eq i64 %10, 0
  %11 = and i64 %div21, 1
  %cmp18 = icmp eq i64 %11, 0
  %or.cond35 = select i1 %cmp15, i1 %cmp18, i1 false
  %12 = and i64 %div22, 1
  %cmp20 = icmp eq i64 %12, 0
  %or.cond36 = select i1 %or.cond35, i1 %cmp20, i1 false
  br i1 %or.cond36, label %while.body, label %while.end

while.end:                                        ; preds = %while.body, %while.cond.preheader
  %i.0.lcssa = phi i64 [ 0, %while.cond.preheader ], [ %inc, %while.body ]
  %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %i.0.lcssa)
  br label %cleanup

cleanup:                                          ; preds = %if.then10, %if.else, %while.end
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #3
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
