#import <stdio.h>
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))
typedef long long INT;

INT GCD(INT a, INT b){
    INT M = MAX(a, b);
    INT m = MIN(a, b);
    while (1) {
        INT r = M % m;
        if (r==0) break;
        M = m;
        m = r;
    }
    return m;
}

int main(){
    INT N;
    INT g = 1;
    scanf("%lld",&N);
    for(INT i=0;i<N;i++){
        INT t;
        scanf("%lld",&t);
        g = t/GCD(t,g) * g;
    }
    printf("%lld", g);
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_730/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_730/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 [5 x i8] c"%lld\00", align 1

; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i64 @GCD(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 {
entry:
  %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b)
  %cond5 = tail call i64 @llvm.smin.i64(i64 %a, i64 %b)
  br label %while.cond

while.cond:                                       ; preds = %while.cond, %entry
  %m.0 = phi i64 [ %cond5, %entry ], [ %rem, %while.cond ]
  %M.0 = phi i64 [ %cond, %entry ], [ %m.0, %while.cond ]
  %rem = srem i64 %M.0, %m.0
  %cmp6 = icmp eq i64 %rem, 0
  br i1 %cmp6, label %while.end, label %while.cond

while.end:                                        ; preds = %while.cond
  ret i64 %m.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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
  %N = alloca i64, align 8
  %t = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #5
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
  %0 = load i64, ptr %N, align 8, !tbaa !5
  %cmp7 = icmp sgt i64 %0, 0
  br i1 %cmp7, label %for.body, label %for.cond.cleanup

for.cond.cleanup:                                 ; preds = %GCD.exit, %entry
  %g.0.lcssa = phi i64 [ 1, %entry ], [ %mul, %GCD.exit ]
  %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %g.0.lcssa)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #5
  ret i32 0

for.body:                                         ; preds = %entry, %GCD.exit
  %i.09 = phi i64 [ %inc, %GCD.exit ], [ 0, %entry ]
  %g.08 = phi i64 [ %mul, %GCD.exit ], [ 1, %entry ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %t) #5
  %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
  %1 = load i64, ptr %t, align 8, !tbaa !5
  %cond.i = call i64 @llvm.smax.i64(i64 %1, i64 %g.08)
  %cond5.i = call i64 @llvm.smin.i64(i64 %1, i64 %g.08)
  br label %while.cond.i

while.cond.i:                                     ; preds = %while.cond.i, %for.body
  %m.0.i = phi i64 [ %cond5.i, %for.body ], [ %rem.i, %while.cond.i ]
  %M.0.i = phi i64 [ %cond.i, %for.body ], [ %m.0.i, %while.cond.i ]
  %rem.i = srem i64 %M.0.i, %m.0.i
  %cmp6.i = icmp eq i64 %rem.i, 0
  br i1 %cmp6.i, label %GCD.exit, label %while.cond.i

GCD.exit:                                         ; preds = %while.cond.i
  %div = sdiv i64 %1, %m.0.i
  %mul = mul nsw i64 %div, %g.08
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %t) #5
  %inc = add nuw nsw i64 %i.09, 1
  %2 = load i64, ptr %N, align 8, !tbaa !5
  %cmp = icmp slt i64 %inc, %2
  br i1 %cmp, label %for.body, label %for.cond.cleanup
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #4

attributes #0 = { nofree nosync nounwind memory(none) 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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
