program abc175a
  implicit none
  integer ans,c,i 
  character(len=10) str
  read(*,'(a)') str
  ans=0
  c=0
  do i=1,len(str)
     if(str(i:i)=='R') then
        c=c+1
     else
        c=0
     end if
     ans=max(ans,c)
  end do
  print*,ans
end program abc175a
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.d18670ab254ba87716f2d37184654c66 = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_780/source.f\00"
@_QQcl.52 = linkonce constant [1 x i8] c"R"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca [10 x i8], align 1
  %2 = tail call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.d18670ab254ba87716f2d37184654c66, i32 5)
  %3 = call i1 @_FortranAioInputAscii(ptr %2, ptr nonnull %1, i64 10)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %6 = icmp eq i32 %5, 0
  %.1 = zext i1 %6 to i32
  %7 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 1
  %8 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %7, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %9 = icmp eq i32 %8, 0
  %10 = select i1 %6, i32 2, i32 1
  %.1.1 = select i1 %9, i32 %10, i32 0
  %11 = call i32 @llvm.smax.i32(i32 %.1, i32 %.1.1)
  %12 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 2
  %13 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %12, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %14 = icmp eq i32 %13, 0
  %15 = add nuw nsw i32 %.1.1, 1
  %.1.2 = select i1 %14, i32 %15, i32 0
  %16 = call i32 @llvm.smax.i32(i32 %11, i32 %.1.2)
  %17 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 3
  %18 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %17, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %19 = icmp eq i32 %18, 0
  %20 = add nuw nsw i32 %.1.2, 1
  %.1.3 = select i1 %19, i32 %20, i32 0
  %21 = call i32 @llvm.smax.i32(i32 %16, i32 %.1.3)
  %22 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 4
  %23 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %22, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %24 = icmp eq i32 %23, 0
  %25 = add nuw nsw i32 %.1.3, 1
  %.1.4 = select i1 %24, i32 %25, i32 0
  %26 = call i32 @llvm.smax.i32(i32 %21, i32 %.1.4)
  %27 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 5
  %28 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %27, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %29 = icmp eq i32 %28, 0
  %30 = add nuw nsw i32 %.1.4, 1
  %.1.5 = select i1 %29, i32 %30, i32 0
  %31 = call i32 @llvm.smax.i32(i32 %26, i32 %.1.5)
  %32 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 6
  %33 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %32, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %34 = icmp eq i32 %33, 0
  %35 = add nuw nsw i32 %.1.5, 1
  %.1.6 = select i1 %34, i32 %35, i32 0
  %36 = call i32 @llvm.smax.i32(i32 %31, i32 %.1.6)
  %37 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 7
  %38 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %37, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %39 = icmp eq i32 %38, 0
  %40 = add nuw nsw i32 %.1.6, 1
  %.1.7 = select i1 %39, i32 %40, i32 0
  %41 = call i32 @llvm.smax.i32(i32 %36, i32 %.1.7)
  %42 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 8
  %43 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %42, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %44 = icmp eq i32 %43, 0
  %45 = add nuw nsw i32 %.1.7, 1
  %.1.8 = select i1 %44, i32 %45, i32 0
  %46 = call i32 @llvm.smax.i32(i32 %41, i32 %.1.8)
  %47 = getelementptr inbounds [10 x [1 x i8]], ptr %1, i64 0, i64 9
  %48 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %47, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %49 = icmp eq i32 %48, 0
  %50 = add nuw nsw i32 %.1.8, 1
  %.1.9 = select i1 %49, i32 %50, i32 0
  %51 = call i32 @llvm.smax.i32(i32 %46, i32 %.1.9)
  %52 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d18670ab254ba87716f2d37184654c66, i32 16)
  %53 = call i1 @_FortranAioOutputInteger32(ptr %52, i32 %51)
  %54 = call i32 @_FortranAioEndIoStatement(ptr %52)
  ret void
}

declare ptr @_FortranAioBeginExternalFormattedInput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputAscii(ptr, ptr, i64) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
