#import <stdio.h>
int f(int x){
  return (x=='+')?1:-1;
}
int main(){
  char a,b,c,d;
  scanf("%c%c%c%c",&a,&b,&c,&d);
  printf("%d", f(a)+f(b)+f(c)+f(d));
  return 0;
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_499/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_499/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 [9 x i8] c"%c%c%c%c\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1

; Function Attrs: minsize mustprogress nofree norecurse nosync nounwind optsize willreturn memory(none) uwtable
define dso_local i32 @f(i32 noundef %x) local_unnamed_addr #0 {
entry:
  %cmp = icmp eq i32 %x, 43
  %cond = select i1 %cmp, i32 1, i32 -1
  ret i32 %cond
}

; Function Attrs: minsize nofree nounwind optsize uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
  %a = alloca i8, align 1
  %b = alloca i8, align 1
  %c = alloca i8, align 1
  %d = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %a) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %b) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %d) #4
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) #5
  %0 = load i8, ptr %a, align 1, !tbaa !5
  %cmp.i = icmp eq i8 %0, 43
  %cond.i = select i1 %cmp.i, i32 1, i32 -1
  %1 = load i8, ptr %b, align 1, !tbaa !5
  %cmp.i11 = icmp eq i8 %1, 43
  %cond.i12 = select i1 %cmp.i11, i32 1, i32 -1
  %add = add nsw i32 %cond.i12, %cond.i
  %2 = load i8, ptr %c, align 1, !tbaa !5
  %cmp.i13 = icmp eq i8 %2, 43
  %cond.i14 = select i1 %cmp.i13, i32 1, i32 -1
  %add6 = add nsw i32 %add, %cond.i14
  %3 = load i8, ptr %d, align 1, !tbaa !5
  %cmp.i15 = icmp eq i8 %3, 43
  %cond.i16 = select i1 %cmp.i15, i32 1, i32 -1
  %add9 = add nsw i32 %add6, %cond.i16
  %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %d) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %b) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %a) #4
  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: minsize nofree nounwind optsize
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: minsize nofree nounwind optsize
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 = { minsize mustprogress nofree norecurse nosync nounwind optsize willreturn 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 = { minsize nofree nounwind optsize 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 = { minsize nofree nounwind optsize "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 = { nounwind }
attributes #5 = { minsize optsize }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
