#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 *, char **);
int strlen(char *);
main() {
  int i, n = 0, max = 0;
  char string[100];
  scanf("%s", &string);
  for (i = 0; i < strlen(string); i++) {
    if (string[i] == 'o' || string[i] == 'O')
      n = n + 1;
    else {
      if (n > max)
        max = n;
      n = 0;
    }
  }
  printf("%d\n", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x80(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
cmp    %ecx,%eax
jge    11e7 <main+0xb7>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x6f,%eax
je     11ad <main+0x7d>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x4f,%eax
jne    11bb <main+0x8b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d4 <main+0xa4>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11cd <main+0x9d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    11d9 <main+0xa9>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1167 <main+0x37>
mov    -0x10(%rbp),%esi
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xebf(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    119b <main+0x6b>
xor    %ebx,%ebx
mov    %rsp,%r14
xor    %r15d,%r15d
xor    %ebp,%ebp
jmp    118c <main+0x5c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %r15d,%ebp
cmovg  %ebp,%r15d
xor    %ebp,%ebp
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    119e <main+0x6e>
movzbl (%rsp,%rbx,1),%eax
or     $0x20,%al
cmp    $0x6f,%al
jne    1170 <main+0x40>
add    $0x1,%ebp
jmp    1179 <main+0x49>
xor    %r15d,%r15d
lea    0xe5e(%rip),%rdi
mov    %r15d,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = call i32 @strlen(i8* %2)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %25
7: ; preds = %0, %18
%8 = phi i64 [ %21, %18 ], [ 0, %0 ]
%9 = phi i32 [ %20, %18 ], [ 0, %0 ]
%10 = phi i32 [ %19, %18 ], [ 0, %0 ]
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %8
%12 = load i8, i8* %11
switch i8 %12, label %15 [
i8 111, label %13
i8 79, label %13
]
13: ; preds = %7, %7
%14 = add nsw i32 %10, 1
br label %18
15: ; preds = %7
%16 = icmp sgt i32 %10, %9
%17 = select i1 %16, i32 %10, i32 %9
br label %18
18: ; preds = %13, %15
%19 = phi i32 [ %14, %13 ], [ 0, %15 ]
%20 = phi i32 [ %9, %13 ], [ %17, %15 ]
%21 = add nuw nsw i64 %8, 1
%22 = call i32 @strlen(i8* %2)
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %7, label %25
25: ; preds = %18, %0
%26 = phi i32 [ 0, %0 ], [ %20, %18 ]
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %26)
ret i32 0
}