#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int numaber;
  int places = 0;
  scanf("%d", &numaber);
  if (numaber <= 0) {
    places += 1;
    numaber *= -1;
  }
  for (; numaber > 0; numaber /= 10) {
    places += 1;
  }
  printf("%d\n", places);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jg     1160 <main+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1165 <main+0x45>
cmpl   $0x0,-0x8(%rbp)
jle    118b <main+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1165 <main+0x45>
mov    -0xc(%rbp),%esi
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
xor    %esi,%esi
test   %eax,%eax
jg     1149 <main+0x29>
neg    %eax
mov    %eax,0x4(%rsp)
mov    $0x1,%esi
jae    1168 <main+0x48>
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
mov    %eax,%edx
add    $0x1,%esi
mov    %eax,%eax
imul   %rcx,%rax
shr    $0x23,%rax
cmp    $0x9,%edx
ja     1150 <main+0x30>
mov    %eax,0x4(%rsp)
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = mul nsw i32 %10, -1
store i32 %11, i32* %2
br label %12
12: ; preds = %7, %0
br label %13
13: ; preds = %19, %12
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16
%20 = load i32, i32* %2
%21 = sdiv i32 %20, 10
store i32 %21, i32* %2
br label %13
22: ; preds = %13
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = sub nsw i32 0, %4
store i32 %7, i32* %1
%8 = icmp eq i32 %4, 0
br i1 %8, label %19, label %9
9: ; preds = %0, %6
%10 = phi i32 [ 0, %0 ], [ 1, %6 ]
%11 = phi i32 [ %4, %0 ], [ %7, %6 ]
br label %12
12: ; preds = %9, %12
%13 = phi i32 [ %15, %12 ], [ %10, %9 ]
%14 = phi i32 [ %16, %12 ], [ %11, %9 ]
%15 = add nuw nsw i32 %13, 1
%16 = udiv i32 %14, 10
%17 = icmp ult i32 %14, 10
br i1 %17, label %18, label %12
18: ; preds = %12
store i32 %16, i32* %1
br label %19
19: ; preds = %18, %6
%20 = phi i32 [ %15, %18 ], [ 1, %6 ]
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
ret i32 0
}