import std.stdio;

void main()
{
	int n;
	scanf("%d", &n);
	printf("%lld\n", 1 + 6L * n * (n + 1) / 2);
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/D/Source_3000/source.d'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/D/Source_3000/source.d"
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"

%0 = type { i32, i32, [7 x i8] }
%object.ModuleInfo = type { i32, i32 }

@.str = private unnamed_addr constant [3 x i8] c"%d\00" ; [#uses = 1]
@.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00" ; [#uses = 1]
@_D6source12__ModuleInfoZ = global %0 { i32 -2147483644, i32 0, [7 x i8] c"source\00" } ; [#uses = 1]
@_D6source11__moduleRefZ = linkonce_odr hidden global %object.ModuleInfo* bitcast (%0* @_D6source12__ModuleInfoZ to %object.ModuleInfo*), section "__minfo" ; [#uses = 1]
@__start___minfo = external hidden global %object.ModuleInfo* ; [#uses = 1]
@__stop___minfo = external hidden global %object.ModuleInfo* ; [#uses = 1]
@ldc.dso_slot = linkonce_odr hidden global i8* null ; [#uses = 1]
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ldc.register_dso, i8* bitcast (void ()* @ldc.register_dso to i8*) }] ; [#uses = 0]
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ldc.register_dso, i8* bitcast (void ()* @ldc.register_dso to i8*) }] ; [#uses = 0]
@llvm.used = appending global [1 x i8*] [i8* bitcast (%object.ModuleInfo** @_D6source11__moduleRefZ to i8*)], section "llvm.metadata" ; [#uses = 0]

; [#uses = 1]
; Function Attrs: nofree nounwind uwtable
define i32 @_Dmain({ i64, { i64, i8* }* } %unnamed) #0 {
  %n = alloca i32, align 4                        ; [#uses = 3, size/byte = 4]
  store i32 0, i32* %n, align 4
  %1 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* nonnull %n) #2 ; [#uses = 0]
  %2 = load i32, i32* %n, align 4                 ; [#uses = 2]
  %3 = sext i32 %2 to i64                         ; [#uses = 1]
  %4 = mul nsw i64 %3, 6                          ; [#uses = 1]
  %5 = add i32 %2, 1                              ; [#uses = 1]
  %6 = sext i32 %5 to i64                         ; [#uses = 1]
  %7 = mul i64 %4, %6                             ; [#uses = 1]
  %8 = sdiv i64 %7, 2                             ; [#uses = 1]
  %9 = add nsw i64 %8, 1                          ; [#uses = 1]
  %10 = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %9) #2 ; [#uses = 0]
  ret i32 0
}

; [#uses = 1]
; Function Attrs: nofree nounwind
declare i32 @scanf(i8* nocapture readonly, ...) local_unnamed_addr #1

; [#uses = 1]
; Function Attrs: nofree nounwind
declare i32 @printf(i8* nocapture readonly, ...) local_unnamed_addr #1

; [#uses = 1]
declare i32 @_d_run_main(i32, i8**, i8*) local_unnamed_addr #2

; [#uses = 0]
; Function Attrs: uwtable
define i32 @main(i32 %argc_arg, i8** %argv_arg) local_unnamed_addr #3 {
  %1 = tail call i32 @_d_run_main(i32 %argc_arg, i8** %argv_arg, i8* bitcast (i32 ({ i64, { i64, i8* }* })* @_Dmain to i8*)) #2 ; [#uses = 1]
  ret i32 %1
}

; [#uses = 2]
define linkonce_odr hidden void @ldc.register_dso() {
  %1 = alloca { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, align 8 ; [#uses = 5, size/byte = 32]
  %2 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 0 ; [#uses = 1, type = i64*]
  store i64 1, i64* %2, align 8
  %3 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 1 ; [#uses = 1, type = i8***]
  store i8** @ldc.dso_slot, i8*** %3, align 8
  %4 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 2 ; [#uses = 1, type = %object.ModuleInfo***]
  store %object.ModuleInfo** @__start___minfo, %object.ModuleInfo*** %4, align 8
  %5 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 3 ; [#uses = 1, type = %object.ModuleInfo***]
  store %object.ModuleInfo** @__stop___minfo, %object.ModuleInfo*** %5, align 8
  %6 = bitcast { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1 to i8* ; [#uses = 1]
  call void @_d_dso_registry(i8* nonnull %6)
  ret void
}

; [#uses = 1]
; Function Attrs: uwtable
declare void @_d_dso_registry(i8*) local_unnamed_addr #4

attributes #0 = { nofree nounwind uwtable "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16,+cx16" }
attributes #1 = { nofree nounwind "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #2 = { "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #3 = { uwtable "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #4 = { uwtable }

!llvm.ident = !{!0}

!0 = !{!"ldc version 1.28.0"}
