#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 *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char price[10];
  int i;
  scanf("%s", price);
  for (i = 0; price[i] != '\0'; i++) {
    if (price[i] == 'O' || price[i] == 'D') {
      price[i] = '0';
    } else if (price[i] == 'I') {
      price[i] = '1';
    } else if (price[i] == 'Z') {
      price[i] = '2';
    } else if (price[i] == 'S') {
      price[i] = '5';
    } else if (price[i] == 'B') {
      price[i] = '8';
    }
  }
  printf("%s\n", price);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     122c <main+0x10c>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x4f,%eax
je     117c <main+0x5c>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x44,%eax
jne    118a <main+0x6a>
movslq -0x14(%rbp),%rax
movb   $0x30,-0xe(%rbp,%rax,1)
jmp    1219 <main+0xf9>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x49,%eax
jne    11aa <main+0x8a>
movslq -0x14(%rbp),%rax
movb   $0x31,-0xe(%rbp,%rax,1)
jmp    1214 <main+0xf4>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x5a,%eax
jne    11ca <main+0xaa>
movslq -0x14(%rbp),%rax
movb   $0x32,-0xe(%rbp,%rax,1)
jmp    120f <main+0xef>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x53,%eax
jne    11ea <main+0xca>
movslq -0x14(%rbp),%rax
movb   $0x35,-0xe(%rbp,%rax,1)
jmp    120a <main+0xea>
movslq -0x14(%rbp),%rax
movsbl -0xe(%rbp,%rax,1),%eax
cmp    $0x42,%eax
jne    1205 <main+0xe5>
movslq -0x14(%rbp),%rax
movb   $0x38,-0xe(%rbp,%rax,1)
jmp    120a <main+0xea>
jmp    120f <main+0xef>
jmp    1214 <main+0xf4>
jmp    1219 <main+0xf9>
jmp    121e <main+0xfe>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1146 <main+0x26>
lea    -0xe(%rbp),%rsi
lea    0xdcc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf38(%rip),%rdi
lea    0x6(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec0(%rip),%rax
jmp    1156 <main+0x36>
mov    $0x38,%cl
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %cl,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%ecx
lea    -0x42(%rcx),%edx
cmp    $0x18,%dl
ja     117b <main+0x5b>
mov    $0x30,%cl
movzbl %dl,%edx
movslq (%rax,%rdx,4),%rdx
add    %rax,%rdx
jmp    *%rdx
mov    $0x31,%cl
jmp    1150 <main+0x30>
mov    $0x35,%cl
jmp    1150 <main+0x30>
mov    $0x32,%cl
jmp    1150 <main+0x30>
test   %cl,%cl
jne    1152 <main+0x32>
lea    0xee1(%rip),%rdi
lea    0x6(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
store i32 0, i32* %3
br label %6
6: ; preds = %80, %0
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %83
13: ; preds = %6
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 79
br i1 %19, label %27, label %20
20: ; preds = %13
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 68
br i1 %26, label %27, label %31
27: ; preds = %20, %13
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %29
store i8 48, i8* %30
br label %79
31: ; preds = %20
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 73
br i1 %37, label %38, label %42
38: ; preds = %31
%39 = load i32, i32* %3
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %40
store i8 49, i8* %41
br label %78
42: ; preds = %31
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 90
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %51
store i8 50, i8* %52
br label %77
53: ; preds = %42
%54 = load i32, i32* %3
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 83
br i1 %59, label %60, label %64
60: ; preds = %53
%61 = load i32, i32* %3
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %62
store i8 53, i8* %63
br label %76
64: ; preds = %53
%65 = load i32, i32* %3
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %66
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 66
br i1 %70, label %71, label %75
71: ; preds = %64
%72 = load i32, i32* %3
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %73
store i8 56, i8* %74
br label %75
75: ; preds = %71, %64
br label %76
76: ; preds = %75, %60
br label %77
77: ; preds = %76, %49
br label %78
78: ; preds = %77, %38
br label %79
79: ; preds = %78, %27
br label %80
80: ; preds = %79
%81 = load i32, i32* %3
%82 = add nsw i32 %81, 1
store i32 %82, i32* %3
br label %6
83: ; preds = %6
%84 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%85 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %84)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %4
4: ; preds = %14, %0
%5 = phi i64 [ %15, %14 ], [ 0, %0 ]
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %14 [
i8 0, label %16
i8 79, label %12
i8 68, label %12
i8 73, label %8
i8 90, label %9
i8 83, label %10
i8 66, label %11
]
8: ; preds = %4
br label %12
9: ; preds = %4
br label %12
10: ; preds = %4
br label %12
11: ; preds = %4
br label %12
12: ; preds = %4, %4, %8, %10, %11, %9
%13 = phi i8 [ 50, %9 ], [ 56, %11 ], [ 53, %10 ], [ 49, %8 ], [ 48, %4 ], [ 48, %4 ]
store i8 %13, i8* %6
br label %14
14: ; preds = %12, %4
%15 = add nuw i64 %5, 1
br label %4
16: ; preds = %4
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}