#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main(int argc, char const *argv[]) {
  char code[100];
  const char TEN_SYM = '<', ONE_SYM = '/', PLUS_SYM = '+';
  int len, sum = 0, num = 0;
  scanf("%s", code);
  len = strlen(code);
  for (int i = 0; i < len; i++) {
    if (code[i] == TEN_SYM) {
      num += 10;
    } else if (code[i] == ONE_SYM) {
      num++;
    } else if (code[i] == PLUS_SYM) {
      sum += num;
      num = 0;
    } else {
      printf("読み取れない文字が入力されました\n");
      break;
    }
    if (i == len - 1)
      sum += num;
  }
  printf("%d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x3c,-0x81(%rbp)
movb   $0x2f,-0x82(%rbp)
movb   $0x2b,-0x83(%rbp)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
lea    -0x80(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x88(%rbp)
movl   $0x0,-0x94(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x88(%rbp),%eax
jge    1294 <main+0x164>
movslq -0x94(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x3c,%eax
jne    11d6 <main+0xa6>
mov    -0x90(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x90(%rbp)
jmp    1252 <main+0x122>
movslq -0x94(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x2f,%eax
jne    11ff <main+0xcf>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    124d <main+0x11d>
movslq -0x94(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x2b,%eax
jne    1235 <main+0x105>
mov    -0x90(%rbp),%eax
add    -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
jmp    1248 <main+0x118>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1294 <main+0x164>
jmp    124d <main+0x11d>
jmp    1252 <main+0x122>
mov    -0x94(%rbp),%eax
mov    -0x88(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    127b <main+0x14b>
mov    -0x90(%rbp),%eax
add    -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
jmp    1280 <main+0x150>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    119b <main+0x6b>
mov    -0x8c(%rbp),%esi
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeb4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11b6 <main+0x76>
lea    -0x1(%rax),%edi
mov    %eax,%eax
xor    %edx,%edx
xor    %esi,%esi
xor    %ebx,%ebx
jmp    1189 <main+0x49>
add    $0x1,%esi
cmp    %rdx,%rdi
mov    $0x0,%ecx
cmove  %esi,%ecx
add    %ecx,%ebx
add    $0x1,%rdx
cmp    %rdx,%rax
je     11c6 <main+0x86>
movzbl (%rsp,%rdx,1),%ecx
cmp    $0x2b,%cl
je     11b0 <main+0x70>
cmp    $0x2f,%cl
je     1170 <main+0x30>
cmp    $0x3c,%cl
jne    11ba <main+0x7a>
add    $0xa,%esi
jmp    1173 <main+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %esi,%ebx
xor    %esi,%esi
jmp    1173 <main+0x33>
xor    %ebx,%ebx
jmp    11c6 <main+0x86>
lea    0xe46(%rip),%rdi
call   1030 <puts@plt>
lea    0xe36(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [50 x i8] c"\E8\AA\AD\E3\81\BF\E5\8F\96\E3\82\8C\E3\81\AA\E3\81\84\E6\96\87\E5\AD\97\E3\81\8C\E5\85\A5\E5\8A\9B\E3\81\95\E3\82\8C\E3\81\BE\E3\81\97\E3\81\9F\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 60, i8* %7
store i8 47, i8* %8
store i8 43, i8* %9
store i32 0, i32* %11
store i32 0, i32* %12
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %10
store i32 0, i32* %13
br label %18
18: ; preds = %67, %2
%19 = load i32, i32* %13
%20 = load i32, i32* %10
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %70
22: ; preds = %18
%23 = load i32, i32* %13
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 60
br i1 %28, label %29, label %32
29: ; preds = %22
%30 = load i32, i32* %12
%31 = add nsw i32 %30, 10
store i32 %31, i32* %12
br label %57
32: ; preds = %22
%33 = load i32, i32* %13
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 47
br i1 %38, label %39, label %42
39: ; preds = %32
%40 = load i32, i32* %12
%41 = add nsw i32 %40, 1
store i32 %41, i32* %12
br label %56
42: ; preds = %32
%43 = load i32, i32* %13
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 43
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = load i32, i32* %12
%51 = load i32, i32* %11
%52 = add nsw i32 %51, %50
store i32 %52, i32* %11
store i32 0, i32* %12
br label %55
53: ; preds = %42
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
br label %70
55: ; preds = %49
br label %56
56: ; preds = %55, %39
br label %57
57: ; preds = %56, %29
%58 = load i32, i32* %13
%59 = load i32, i32* %10
%60 = sub nsw i32 %59, 1
%61 = icmp eq i32 %58, %60
br i1 %61, label %62, label %66
62: ; preds = %57
%63 = load i32, i32* %12
%64 = load i32, i32* %11
%65 = add nsw i32 %64, %63
store i32 %65, i32* %11
br label %66
66: ; preds = %62, %57
br label %67
67: ; preds = %66
%68 = load i32, i32* %13
%69 = add nsw i32 %68, 1
store i32 %69, i32* %13
br label %18
70: ; preds = %53, %18
%71 = load i32, i32* %11
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %71)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [49 x i8] c"\E8\AA\AD\E3\81\BF\E5\8F\96\E3\82\8C\E3\81\AA\E3\81\84\E6\96\87\E5\AD\97\E3\81\8C\E5\85\A5\E5\8A\9B\E3\81\95\E3\82\8C\E3\81\BE\E3\81\97\E3\81\9F\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @strlen(i8* %4)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %34
8: ; preds = %2
%9 = add nsw i32 %6, -1
%10 = zext i32 %9 to i64
%11 = zext i32 %6 to i64
br label %12
12: ; preds = %8, %26
%13 = phi i64 [ 0, %8 ], [ %32, %26 ]
%14 = phi i32 [ 0, %8 ], [ %28, %26 ]
%15 = phi i32 [ 0, %8 ], [ %31, %26 ]
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %13
%17 = load i8, i8* %16
switch i8 %17, label %24 [
i8 60, label %18
i8 47, label %20
i8 43, label %22
]
18: ; preds = %12
%19 = add nsw i32 %14, 10
br label %26
20: ; preds = %12
%21 = add nsw i32 %14, 1
br label %26
22: ; preds = %12
%23 = add nsw i32 %14, %15
br label %26
24: ; preds = %12
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
br label %34
26: ; preds = %20, %22, %18
%27 = phi i32 [ %15, %18 ], [ %15, %20 ], [ %23, %22 ]
%28 = phi i32 [ %19, %18 ], [ %21, %20 ], [ 0, %22 ]
%29 = icmp eq i64 %13, %10
%30 = select i1 %29, i32 %28, i32 0
%31 = add nsw i32 %30, %27
%32 = add nuw nsw i64 %13, 1
%33 = icmp eq i64 %32, %11
br i1 %33, label %34, label %12
34: ; preds = %26, %2, %24
%35 = phi i32 [ %15, %24 ], [ 0, %2 ], [ %31, %26 ]
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %35)
ret i32 0
}