import Foundation
 
let inputs = readLine()!.components(separatedBy: " ")

for (index, input) in inputs.enumerated() {
    if input == "0" {
        print(index + 1)
    }
}
    

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_140/llvm_OZ.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_140/llvm_OZ.ll"
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-unknown-linux-gnu"

%TSa = type <{ %Ts22_ContiguousArrayBufferV }>
%Ts22_ContiguousArrayBufferV = type <{ %Ts28__ContiguousArrayStorageBaseC* }>
%Ts28__ContiguousArrayStorageBaseC = type <{ %swift.refcounted, %Ts10_ArrayBodyV }>
%swift.refcounted = type { %swift.type*, i64 }
%swift.type = type { i64 }
%Ts10_ArrayBodyV = type <{ %TSo22_SwiftArrayBodyStorageV }>
%TSo22_SwiftArrayBodyStorageV = type <{ %TSi, %TSu }>
%TSi = type <{ i64 }>
%TSu = type <{ i64 }>
%swift.protocol_conformance_descriptor = type { i32, i32, i32, i32 }
%swift.type_descriptor = type opaque
%TSS = type <{ %Ts11_StringGutsV }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%swift.bridge = type opaque
%swift.opaque = type opaque

@"$s7llvm_OZ6inputsSaySSGvp" = hidden local_unnamed_addr global %TSa zeroinitializer, align 8
@"$sSSN" = external global %swift.type, align 8
@"$sS2SSysWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 8
@"$sSSSysMc" = external global %swift.protocol_conformance_descriptor, align 4
@"$ss23_ContiguousArrayStorageCMn" = external global %swift.type_descriptor, align 4
@"got.$ss23_ContiguousArrayStorageCMn" = private unnamed_addr constant %swift.type_descriptor* @"$ss23_ContiguousArrayStorageCMn"
@"symbolic _____yypG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [4 x i8], i8 }> <{ i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.type_descriptor** @"got.$ss23_ContiguousArrayStorageCMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, [4 x i8], i8 }>, <{ i8, i32, [4 x i8], i8 }>* @"symbolic _____yypG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"yypG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCyypGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____yypG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCyypGMD" to i64)) to i32), i32 -9 }, align 8
@"$sSiN" = external global %swift.type, align 8
@"\01l_entry_point" = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (i32 (i32, i8**)* @main to i64), i64 ptrtoint ({ i32, i32 }* @"\01l_entry_point" to i64)) to i32), i32 0 }, section "swift5_entry", align 4
@__swift_reflection_version = linkonce_odr hidden constant i16 3
@_swift1_autolink_entries = private constant [172 x i8] c"-lFoundation\00-lswiftCore\00-lswift_StringProcessing\00-lswift_RegexParser\00-lswift_Concurrency\00-lswiftGlibc\00-lm\00-lpthread\00-lutil\00-ldl\00-lswiftDispatch\00-ldispatch\00-lBlocksRuntime\00", section ".swift1_autolink_entries", no_sanitize_address, align 8
@llvm.compiler.used = appending global [4 x i8*] [i8* bitcast ({ i32, i32 }* @"\01l_entry_point" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*), i8* getelementptr inbounds ([172 x i8], [172 x i8]* @_swift1_autolink_entries, i32 0, i32 0), i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata"

; Function Attrs: minsize optsize
define protected i32 @main(i32 %0, i8** nocapture readnone %1) #0 {
entry:
  %2 = alloca %TSS, align 8
  %3 = alloca %TSS, align 8
  %4 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %5 = extractvalue { i64, i64 } %4, 1
  %6 = icmp eq i64 %5, 0
  br i1 %6, label %44, label %7

7:                                                ; preds = %entry
  %8 = extractvalue { i64, i64 } %4, 0
  %9 = inttoptr i64 %5 to %swift.bridge*
  %10 = bitcast %TSS* %2 to i8*
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %10)
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %2, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 %8, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS, %TSS* %2, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* %9, %swift.bridge** %._guts._object._object, align 8
  %11 = bitcast %TSS* %3 to i8*
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %11)
  %._guts1._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %3, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 32, i64* %._guts1._object._countAndFlagsBits._value, align 8
  %._guts1._object._object = getelementptr inbounds %TSS, %TSS* %3, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* inttoptr (i64 -2233785415175766016 to %swift.bridge*), %swift.bridge** %._guts1._object._object, align 8
  %12 = bitcast %TSS* %3 to %swift.opaque*
  %13 = tail call i8** @"$sS2SSysWl"() #9
  %14 = bitcast %TSS* %2 to %swift.opaque*
  %15 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSy10FoundationE10components11separatedBySaySSGqd___tSyRd__lF"(%swift.opaque* noalias nocapture nonnull %12, %swift.type* nonnull @"$sSSN", %swift.type* nonnull @"$sSSN", i8** %13, i8** %13, %swift.opaque* noalias nocapture nonnull swiftself %14)
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %9) #5
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %11)
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %10)
  store %Ts28__ContiguousArrayStorageBaseC* %15, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_OZ6inputsSaySSGvp", i64 0, i32 0, i32 0), align 8
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 0, i32 1, i32 0, i32 0, i32 0
  %16 = load i64, i64* %._storage.count._value, align 8, !range !6
  %17 = icmp eq i64 %16, 0
  br i1 %17, label %22, label %18

18:                                               ; preds = %7
  %19 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %19 to %TSS*
  %20 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 0, i32 0
  %21 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %20) #10
  br label %23

22:                                               ; preds = %7, %43
  ret i32 0

23:                                               ; preds = %41, %18
  %24 = phi i64 [ 0, %18 ], [ %27, %41 ]
  %._guts2._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %24, i32 0, i32 0, i32 0, i32 0
  %25 = load i64, i64* %._guts2._object._countAndFlagsBits._value, align 8
  %._guts2._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %24, i32 0, i32 0, i32 1
  %26 = load %swift.bridge*, %swift.bridge** %._guts2._object._object, align 8
  %27 = add nuw nsw i64 %24, 1
  %28 = icmp eq i64 %25, 48
  %29 = icmp eq %swift.bridge* %26, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond = select i1 %28, i1 %29, i1 false
  br i1 %or.cond, label %32, label %30

30:                                               ; preds = %23
  %31 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %25, %swift.bridge* %26, i64 48, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %31, label %32, label %41

32:                                               ; preds = %23, %30
  %33 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #11
  %34 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %33, i64 64, i64 7) #5
  %35 = bitcast %swift.refcounted* %34 to %Ts28__ContiguousArrayStorageBaseC*
  %36 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %34, i64 1
  %._storage3.count._value = bitcast %swift.refcounted* %36 to i64*
  store i64 1, i64* %._storage3.count._value, align 8
  %._storage3._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %34, i64 1, i32 1
  store i64 2, i64* %._storage3._capacityAndFlags, align 8
  %37 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %34, i64 2
  %38 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %34, i64 3, i32 1
  %39 = bitcast i64* %38 to %swift.type**
  store %swift.type* @"$sSiN", %swift.type** %39, align 8
  %._value = bitcast %swift.refcounted* %37 to i64*
  store i64 %27, i64* %._value, align 8
  %40 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %26) #5
  tail call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %35, i64 32, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i64 10, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*))
  tail call void @swift_release(%swift.refcounted* %34) #5
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %26) #5
  br label %41

41:                                               ; preds = %30, %32
  %42 = icmp eq i64 %27, %16
  br i1 %42, label %43, label %23

43:                                               ; preds = %41
  tail call void @swift_release(%swift.refcounted* %20) #5
  br label %22

44:                                               ; preds = %entry
  tail call void asm sideeffect "", "n"(i32 0) #5
  tail call void @llvm.trap()
  unreachable
}

; Function Attrs: minsize optsize
declare swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #1

; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #2

; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #2

; Function Attrs: minsize optsize
declare swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSy10FoundationE10components11separatedBySaySSGqd___tSyRd__lF"(%swift.opaque* noalias nocapture, %swift.type*, %swift.type*, i8**, i8**, %swift.opaque* noalias nocapture swiftself) local_unnamed_addr #0

; Function Attrs: minsize nofree noinline nosync nounwind optsize readnone
define linkonce_odr hidden i8** @"$sS2SSysWl"() local_unnamed_addr #3 {
entry:
  %0 = load i8**, i8*** @"$sS2SSysWL", align 8
  %1 = icmp eq i8** %0, null
  br i1 %1, label %cacheIsNull, label %cont

cacheIsNull:                                      ; preds = %entry
  %2 = tail call i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor* nonnull @"$sSSSysMc", %swift.type* nonnull @"$sSSN", i8*** undef) #11
  store atomic i8** %2, i8*** @"$sS2SSysWL" release, align 8
  br label %cont

cont:                                             ; preds = %cacheIsNull, %entry
  %3 = phi i8** [ %0, %entry ], [ %2, %cacheIsNull ]
  ret i8** %3
}

; Function Attrs: nofree nounwind readonly
declare i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor*, %swift.type*, i8***) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @swift_bridgeObjectRelease(%swift.bridge*) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind willreturn
declare %swift.refcounted* @swift_retain(%swift.refcounted* returned) local_unnamed_addr #6

; Function Attrs: minsize optsize
declare swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64, %swift.bridge*, i64, %swift.bridge*, i8) local_unnamed_addr #0

; Function Attrs: nounwind
declare void @swift_release(%swift.refcounted*) local_unnamed_addr #5

; Function Attrs: minsize mustprogress nofree noinline nounwind optsize readonly willreturn
define linkonce_odr hidden %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* %0) local_unnamed_addr #7 {
entry:
  %1 = bitcast { i32, i32 }* %0 to i64*
  %2 = load atomic i64, i64* %1 monotonic, align 8
  %3 = icmp slt i64 %2, 0
  br i1 %3, label %7, label %4, !prof !7

4:                                                ; preds = %7, %entry
  %5 = phi i64 [ %2, %entry ], [ %15, %7 ]
  %6 = inttoptr i64 %5 to %swift.type*
  ret %swift.type* %6

7:                                                ; preds = %entry
  %8 = ashr i64 %2, 32
  %9 = sub nsw i64 0, %8
  %sext = shl i64 %2, 32
  %10 = ashr exact i64 %sext, 32
  %11 = ptrtoint { i32, i32 }* %0 to i64
  %12 = add i64 %10, %11
  %13 = inttoptr i64 %12 to i8*
  %14 = tail call swiftcc %swift.type* @swift_getTypeByMangledNameInContext2(i8* %13, i64 %9, %swift.type_descriptor* null, i8** null) #12
  %15 = ptrtoint %swift.type* %14 to i64
  store atomic i64 %15, i64* %1 monotonic, align 8
  br label %4
}

; Function Attrs: argmemonly nounwind
declare swiftcc %swift.type* @swift_getTypeByMangledNameInContext2(i8*, i64, %swift.type_descriptor*, i8**) local_unnamed_addr #8

; Function Attrs: nounwind
declare %swift.refcounted* @swift_allocObject(%swift.type*, i64, i64) local_unnamed_addr #5

; Function Attrs: minsize optsize
declare swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC*, i64, %swift.bridge*, i64, %swift.bridge*) local_unnamed_addr #0

; Function Attrs: nounwind
declare %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned) local_unnamed_addr #5

attributes #0 = { minsize optsize "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { cold noreturn nounwind }
attributes #2 = { argmemonly mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { minsize nofree noinline nosync nounwind optsize readnone "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind readonly }
attributes #5 = { nounwind }
attributes #6 = { mustprogress nounwind willreturn }
attributes #7 = { minsize mustprogress nofree noinline nounwind optsize readonly willreturn "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { argmemonly nounwind }
attributes #9 = { nounwind readnone }
attributes #10 = { nounwind willreturn }
attributes #11 = { nounwind readonly }
attributes #12 = { argmemonly nounwind readonly }

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

!0 = !{!"standard-library", i1 false}
!1 = !{i32 1, !"wchar_size", i32 4}
!2 = !{i32 8, !"PIC Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{i32 4, !"Objective-C Garbage Collection", i32 84477696}
!5 = !{i32 1, !"Swift Version", i32 7}
!6 = !{i64 0, i64 9223372036854775807}
!7 = !{!"branch_weights", i32 1, i32 2000}
