#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() {
  char s[100];
  scanf("%s", s);
  int b = strlen(s);
  int z = 0;
  int prom = 0;
  b = b - 1;
  while (z < b) {
    if (s[z] != s[b]) {
      prom = 1;
      break;
    }
    b--;
    z++;
  }
  if (prom == 1)
    printf("0 \n");
  else
    printf("1 \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    11be <main+0x8e>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
movslq -0x74(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     11a7 <main+0x77>
movl   $0x1,-0x7c(%rbp)
jmp    11be <main+0x8e>
mov    -0x74(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1175 <main+0x45>
cmpl   $0x1,-0x7c(%rbp)
jne    11d9 <main+0xa9>
lea    0xe34(%rip),%rdi
call   1040 <printf@plt>
jmp    11e5 <main+0xb5>
lea    0xe27(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xead(%rip),%rdi
cmp    $0x2,%eax
jl     118f <main+0x5f>
mov    %eax,%eax
add    $0xfffffffffffffffe,%rax
xor    %ecx,%ecx
lea    0xe9c(%rip),%rdx
nopw   0x0(%rax,%rax,1)
movzbl (%rsp,%rcx,1),%ebx
cmp    0x1(%rsp,%rax,1),%bl
jne    118c <main+0x5c>
add    $0x1,%rcx
lea    -0x1(%rax),%rsi
cmp    %rax,%rcx
mov    %rsi,%rax
jl     1170 <main+0x40>
jmp    118f <main+0x5f>
mov    %rdx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"0 \0A\00"
@.str.2 = [4 x i8] c"1 \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %29, %0
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %34
16: ; preds = %12
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %21, %26
br i1 %27, label %28, label %29
28: ; preds = %16
store i32 1, i32* %5
br label %34
29: ; preds = %16
%30 = load i32, i32* %3
%31 = add nsw i32 %30, -1
store i32 %31, i32* %3
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %12
34: ; preds = %28, %12
%35 = load i32, i32* %5
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %41
39: ; preds = %34
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %41
41: ; preds = %39, %37
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [3 x i8] c"1 \00"
@str.3 = [3 x i8] c"0 \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 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)
%4 = call i32 @strlen(i8* %2)
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %21
6: ; preds = %0
%7 = zext i32 %4 to i64
%8 = add nsw i64 %7, -1
br label %12
9: ; preds = %12
%10 = add nsw i64 %14, -1
%11 = icmp slt i64 %20, %10
br i1 %11, label %12, label %21
12: ; preds = %6, %9
%13 = phi i64 [ 0, %6 ], [ %20, %9 ]
%14 = phi i64 [ %8, %6 ], [ %10, %9 ]
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %13
%16 = load i8, i8* %15
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %14
%18 = load i8, i8* %17
%19 = icmp eq i8 %16, %18
%20 = add nuw nsw i64 %13, 1
br i1 %19, label %9, label %21
21: ; preds = %9, %12, %0
%22 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0), %12 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %9 ]
%23 = call i32 @puts(i8* dereferenceable(1) %22)
ret i32 0
}