jiahuimbzuai/CoQuIR huggingface dataset:
//  [rust]
use whiteread::parse_line;

fn main() {
    let (n, k): (usize, usize) = parse_line().unwrap();
    let s: Vec<u32> = parse_line().unwrap();
    let mut maxsum = 0;
    let mut maxi = 0;
    let mut ans = 0.0;

    for i in 0..n - k + 1 {
        let sum = s[i..i + k].iter().sum();
        if sum > maxsum {
            maxsum = sum;
            maxi = i;
        }
    }
    for i in 0..k {
        ans += (1 + s[maxi + i]) as f64 / 2.0;
    }
    println!("{}", ans);
}
//  [python]
n,k = map(int,input().split())

ans = 1

for i in range(n):
   if i == 0:
      ans *= k
   else:
      ans *= k-1

print(ans)
//  [python]
N, K = map(int, input().split())

# 最初の一回目はKパターン
ans = K
for i in range(1,N):
    if K-1>0:
        ans *= K-1
print(ans)
//  [python]
n, k = map(int, input().split())

ans = 1
for i in range(n - 1):
    ans *= k - 1

print(ans * k)
//  [python]
import re
import doctest


class IO_for_Contest(object):
    @staticmethod
    def my_input():
        # return raw_input()
        return input()

    @staticmethod
    def read_from_input():
        return IO_for_Contest.read_n_int(2)

    @staticmethod
    def read_line():
        return IO_for_Contest.my_input().strip()

    @staticmethod
    def read_int():
        return int(IO_for_Contest.my_input().strip())

    @staticmethod
    def read_n_int(n):
        return list(map(
                    int,
                    re.split('\s+', IO_for_Contest.my_input().strip())))[: n]


def solve():
    buf = IO_for_Contest.read_from_input()
    n = buf[0]
    k = buf[1]
    print(k * ((k - 1) ** (n - 1)))


if __name__ == '__main__':
    # doctest.testmod()
    solve()
//  [python]
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7


def main():
    n,k = list(map(int, input().split()))
    r = k
    for _ in range(1,n):
        r *= k-1
    return r


print(main())
//  [python]
import sys
sys.setrecursionlimit(10000)


def solve():
    N, K = list(map(int, input().split()))

    TABLE = [[-1 for x in range(K + 3)] for y in range(N + 3)]

    def recur(i, k):
        if not i < N:
            return 1

        if not TABLE[i][k] == -1:
            return TABLE[i][k]

        ans = 0
        for a in range(K):
            if not a == k:
                ans += recur(i + 1, a)

        TABLE[i][k] = ans
        return TABLE[i][k]

    return recur(0, -1)


if __name__ == '__main__':
    res = solve()
    print(res)
//  [java]
import java.util.*;
import java.io.*;
class Main {
    static long ans=0;
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int N = Integer.parseInt(st.nextToken());
        int K = Integer.parseInt(st.nextToken());
        
        long ans=K;
        for(int i=1; i<N; i++)
            ans*=(K-1);

        System.out.println(ans);
    }
}
//  [java]
import java.io.IOException;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        try (
            BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in))) {
            final String s = reader.readLine();

            final String[] sl = s.split(" ");
            int N = Integer.parseInt(sl[0]);
            int K = Integer.parseInt(sl[1]);

            System.out.println(K * (int)Math.pow(K - 1, N - 1));
        }
    }
}
//  [java]
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    static class Task {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();

            int ans = k;
            for (int i = 1; i < n; i++) {
                ans *= (k - 1);
            }

            out.println(ans);
        }
    }

    private static void sort(double[] arr) {
        Double[] objArr = Arrays.stream(arr).boxed().toArray(Double[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(int[] arr) {
        Integer[] objArr = Arrays.stream(arr).boxed().toArray(Integer[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(long[] arr) {
        Long[] objArr = Arrays.stream(arr).boxed().toArray(Long[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task task = new Task();
        task.solve(1, in, out);
        out.close();
    }

    public static void main(String[] args) {
        new Thread(null, () -> solve(), "1", 1 << 26).start();
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

    }

}
//  [java]
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		sc.close();

		int ans = k;
		for (int i = 1; i < n; i++) {
			ans *= k - 1;
		}
		System.out.println(ans);
	}
}
//  [cpp]


#include<stdio.h>

int main(void){
    int a,b,c=1;
    scanf("%d %d",&a,&b);
    c=b;
    for(int i=0; i<a-1; i++){
        c=c*(b-1);
    }
    printf("%d\n",c);
    return 0;
}
//  [cpp]
#include<cstdio>

int read(){
    int x=0,f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
    while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
    return x*f;
}

int Pow(int x,int y){
    int ret=1;
    while(y){
        if(y&1) ret*=x;
        y>>=1;
        x=x*x;
    }
    return ret;
}

int main(){
    int N=read(),K=read();
    printf("%d",K*Pow(K-1,N-1));
}
//  [cpp]
#include <stdio.h>
int main(void){
  int N,K;
  scanf("%d%d", &N,&K);
  int sum = K;
  for(int i = 1;i <= (N-1);i++){
    sum = sum * (K-1);
  }printf("%d\n",sum);
  return 0;
}
//  [cpp]
#include<iostream>
using namespace std;
int main(){
	int n,k;
	cin>>n>>k;

	int ans = 1;
	ans *= k;
	for(int i = 1;i < n;i++){
		ans *= (k-1);
	}
	cout << ans << endl;
	return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int n, k;  scanf("%d %d", &n, &k);
  long ans = k;
  for(int i=1; i<n; i++)
    ans *= (long)(k-1);

  printf("%ld\n", ans);
  return 0;
}
//  [c]
#include <stdio.h>
int main() {
	int n, k, ans;
	scanf("%d%d", &n, &k);
	ans = k;
	for (int i = 1; i < n; i++) {
		ans *= k - 1;
	}
	printf("%d\n", ans);
	return 0;
}
//  [c]
#include<stdio.h>

int main(){
    int n, k;
    scanf("%d%d", &n, &k);
    long long int sum = k;
    for(int i=1; i<n; i++){
        sum *= (k-1);
    }
    printf("%lld", sum);

    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)

int main()
{
    int N, K,i;
    

    scanf("%d %d", &N, &K);

    int count = K;

    for (i = 1; i < N; i++) {
        count *= (K - 1);
    }

    printf("%d", count);

    return 0;

}
//  [c]
#include<stdio.h>
int main(){
  int n,k,i;
  scanf("%d%d",&n,&k);
  long long count=k;
  k--;
  for(i=1;i<n;i++)
    count*=(long long)k;
  printf("%lld\n",count);
  return 0;
}
//  [c]
#include<stdio.h>

int main(){
  int N,K;
  long ans=0;
  scanf("%d%d",&N,&K);

  ans = K;
  K--;
  for (int i = 0; i < N-1; i++){ ans *= K; }
  printf("%ld",ans);

  return 0;
}
//  [javascript]
function Main(input) {
  input = input.trim().split(" ");
  var N = parseInt(input[0], 10);
  var K = parseInt(input[1], 10);

  var sum = K;

  for (var i = 1; i < N; i++) {
    sum *= K - 1;
  }

  console.log(sum);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input = input.trim().split(" ");
  var N = parseInt(input[0], 10);
  var K = parseInt(input[1], 10);
 
  var sum = K;
 
  for (var i = 1; i < N; i++) {
    sum *= K - 1;
  }
 
  console.log(sum);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'
const main = arg => {
	const input = arg.trim().split("\n");
	let N = input[0].split(' ')[0]
	let K = input[0].split(' ')[1]
	let result = K
	for(let i = 1; i < N; i++) {
		result = result * (K - 1)
	}
	console.log(result)
}   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
	input = input.split(" ");
  console.log(input[1]*Math.pow(input[1]-1,input[0]-1))
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
function Main(inp) {
    var input = inp.split('\n')[0].split(' ').map(function(n) {
        return Number(n);
    });
    var numbers = input[0];
    var colors = input[1];
    // 1個目 colors 通り
    // 2個目 colors - 1 通り, 3個目 colors - 1 通り, ...
    // colors * (colors - 1) ^ (numbers - 1)
    var patterns = colors * Math.pow(colors - 1, numbers - 1); 
    console.log(patterns);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = ~~arg[0].split(" ")[0];
    const K = ~~arg[0].split(" ")[1];
    
    console.log(K * (Math.pow((K-1), N-1)));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"fmt"
	"math"
)

func main() {
	var N, K int
	fmt.Scanf("%d %d", &N, &K)

	fmt.Println(K * int(math.Pow(float64(K-1), float64(N-1))))
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var N, K int
	fmt.Scan(&N, &K)

	ans := K
	for i := 0; i < N-1; i++ {
		ans *= K - 1
	}
	fmt.Println(ans)
}
//  [go]
package main

import (
	"fmt"
	"math"
)

func main() {
	var n, k int
	fmt.Scan(&n, &k)

	fmt.Println(k * int(math.Pow(float64(k-1), float64(n-1))))

}
//  [go]
package main

import (
	"fmt"
	"math"
)

func main() {
	var n, k float64
	fmt.Scan(&n, &k)
	fmt.Println(int(k * math.Pow(k-1, n-1)))
}
//  [go]
package main

import (
  "fmt"
)

func main() {
  var n, k int
  fmt.Scanf("%d %d", &n, &k)

  ans := k
  for i := 1; i < n; i++ {
    ans *= k - 1
  }

  fmt.Println(ans)
}
//  [go]
package main

import "fmt"

func main() {
	// Code for B - Painting Balls with AtCoDeer
	var N, K int
	fmt.Scanf("%d %d", &N, &K)

	var ans int = K
	for i := 1; i < N; i++ {
		ans *= K - 1
	}

	fmt.Println(ans)
}
//  [ruby]
N,K=gets.strip.split.map(&:to_i)
ans=K
(N-1).times do
  ans*=K-1
end
puts ans
//  [ruby]
n, k = gets.chomp.split.map(&:to_i)
puts k * ((k-1) ** (n-1))
//  [ruby]
nk = gets.chomp.split
n = nk[0].to_i
k = nk[1].to_i

combi = k
(n - 1).times do
    combi *= k - 1
end

puts combi
//  [ruby]
require 'pp'
$DEBUG ? define_method(:dpp){|e|pp e} : define_method(:dpp){|e|}

# 空白区切の入力値を数値の配列で返却する
def gets_i_list()
  gets.chomp.split(" ").map(&:to_i)
end
n, k = gets_i_list

puts k * ((k-1) ** (n-1))
//  [ruby]
n,k = gets.chomp.split(' ').map(&:to_i)
if n == 1
  puts k
else
  puts k*(k-1)**(n-1)
end
//  [ruby]
n,k = gets.chomp.split(" ").map(&:to_i);
p k*(k-1)**(n-1)
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input!{
        n: u64,
        k: u64,
    };
    println!(
        "{}",
        k * (k - 1).pow((n-1) as u32)
    );
}
//  [rust]
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<u32> = procon_read();
	let n = v[0];
	let k = v[1];
	println!("{}", k*((k-1).pow(n-1)));
}
//  [rust]
fn main(){
proconio::input!{n:u32,k:i32}
println!("{}",k*(k-1).pow(n-1));
}
//  [rust]
fn main() {
    proconio::input! {
        n: usize,
        k: usize,
    }
    let ans = (1..n).map(|_| k - 1).fold(k, |sum, i| sum * i);
    println!("{}", ans);
}
//  [rust]
#![allow(unused_imports)]
// use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        n: u32,
        k: usize
    };
    println!("{}", k * (k - 1).pow(n - 1));
}
//  [rust]
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        n: usize,
        k: usize,
    }

    println!("{}", (k as u32)*((k-1) as u32).pow((n-1) as u32))

}
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (N, K) = (input[0], input[1])
print((1..<N).reduce(K){$0.0*(K-1)})
//  [typescript]
"use strict";

const Main = args => {
  const input = args.trim().split(" ").map(e => e - 0);
  const N = input[0];
  const K = input[1];

  console.log(K * Math.pow(K - 1, N - 1));
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input: any): void => {
  let [N, K] = (input.split('\n')[0].split(' '))
  N = Number(N)
  K = Number(K)
  console.log(K * ((K - 1) ** (N - 1)))
}


main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
import * as fs from 'fs'

const getInput = (): string => {
  return (fs.readFileSync('/dev/stdin', 'utf8') as string).trim()
}

export const solveAbc046b = () => {
  const input = getInput()

  const [N, K] = input.trim().split(' ').map(Number)
  let count = K
  for (let i = 2; i <= N; i += 1) {
    count *= K - 1
  }

  console.log(count)
}

solveAbc046b()
//  [typescript]
{
  const Main = input => {
    const [n, k] = input.trim().split(" ").map(v => parseInt(v))

    let count = k
    for (let i = 0; i < n; i++) {
      if (i !== 0) count *= k - 1
    }

    console.log(count)
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const [N, K] = input[0].map(BigInt);

  return (K * (K - 1n) ** (N - 1n)).toString();
};

console.log(main(read()));
//  [python]
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

S = input()
cnt = 0
ans = 0
for i in range(len(S)):
    if S[i] == 'S':
        ans = max(ans, cnt)
        cnt = 0
    else:
        cnt += 1
ans = max(ans, cnt)
print(ans)
//  [python]
def examA():
    S = SI()
    ans = 0
    if "R" in S:
        ans = 1
    if "RR" in S:
        ans = 2
    if "RRR" in S:
        ans = 3
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

def test():
    i = I()
    li = LI()
    lsi = LSI()
    si = LS()
    print(i)
    print(li)
    print(lsi)
    print(si)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""
//  [java]
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        String str = sn.next();
        int cnt = 0;
        for ( int i = 0; i < 3; i++){
            String c = str.substring(i,i+1);
            if (c.equals("R")){
                cnt = cnt + 1;
            }
        }
        if ( str.equals("RSR")) {
                cnt = 1;
        }
        System.out.println(cnt);
    }
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		int total = 0;

		String S1 = S.substring(0,1);
		String S2 = S.substring(1,2);
		String S3 = S.substring(2,3);

		int count = 0;
		while(count < 1)
		{
			if((S1 + S2 + S3).equals("RRR"))
			{
				total += 3;
				break;
			}

			if((S1 + S2).equals("RR") || (S2 + S3).equals("RR"))
			{
				total += 2;
				break;
			}

			if(S1.equals("R") || S2.equals("R") || S3.equals("R"))
			{
				total += 1;
				break;
			}
			count++;
		}

		System.out.println(total);

		scan.close();
	}
}
//  [java]
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		String a = scan.next();
		char b = a.charAt(0);
		char c = a.charAt(1);
		char d = a.charAt(2);
		char f = 'R';

		if(b==c && c==d && d==f) {

			System.out.println("3");

		}else if((b==c && c==f) || (c==d && d==f)) {

			System.out.println("2");

		}else if(!(b==f || c==f || d==f)) {

			System.out.println("0");

		}else {
			System.out.println("1");
		}
	}
}
//  [cpp]
#include <iostream>
#include<bits/stdc++.h>
#include<cmath>
#include <algorithm> 
#include <unordered_map>

using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	string n;
	cin >> n;
	vector<long long>ans(10000001);
	int ct = 0;
	int f = 0;
	for (int i = 0; i < 3; i++) {
		if (n[i] == 'R') {
			if (f == 0) {
				ct++;
			}
			else {
				ct++;
				f = 0;
			}
		}
		else {
			f = 1;
			
			ans.push_back(ct);
			ct = 0;
		}
	}
	ans.push_back(ct);
	sort(ans.begin(), ans.end());
	cout << ans[ans.size()-1];
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

char s[9];
int main(){
	scanf("%s",s);
	if(strcmp(s,"RRR")==0)puts("3");
	else if(strcmp(s,"SSS")==0)puts("0");
	else if(strcmp(s,"RRS")==0||strcmp(s,"SRR")==0)puts("2");
	else puts("1");
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>


int main(){
	int N=3;
	char s[N];
	// scanf("%s",s);
	if(scanf("%s",s)==1);
	int num=0;
	// printf("%c",s[0]);
	// printf("%c",s[1]);

	// printf("%c",s[2]);

	int a[N];
	for(int i=0;i<N;i++){
		if(s[i]=='R'){
			a[i]=1;
			num++;
		}else{
			a[i]=0;
		}
	}
	// for(int i=0;i<N;i++){
	// 	printf("%d\n",a[i]);
	// }
	// printf("num=%d\n",num );
	if(num==1||num==3){
		printf("%d\n",num);
	}else if(num==2){
		if(a[1]==1)printf("%d\n",num);
		else printf("1\n");
	}else{
		printf("0\n");
	}

}
	
// 1変数
	// int N;
	// if(scanf("%d",&N)==1);

// 2変数
	// int a[N];
	// for(int i=0;i<N;i++){
	// 	a[i]=0;
	// 	if(scanf("%d ",&a[i])==1);
	// }

//文字列
	// char s[101];
	// scanf("%s",s);

// N個の変数
	// int X[N],Y[N];
	// for(int i=0;i<N;i++){
	// 	(void)scanf("%d %d",&X[i],&Y[i]);	
	// }





// for文
	// for(int i=0;i<N;i++){

	// }

	// for(int j=0;j<N;j++){
		
	// }
//  [c]
#include <stdio.h>

int main(void) {
  char data[4];
  
  scanf("%s", data);
  char d = data[0];
  int ret = 0;
  if(data[0] == 'S') {
    if(data[1] == 'S') {
        if(data[2] == 'S') {
            ret = 0;
        } else {
            ret = 1;
        }
    } else {
        if(data[2] == 'S') { ret = 1; }
        else { ret = 2;}
    }
  } else {
      if(data[1] == 'S') {
        if(data[2] == 'S') { ret = 1;}
        else { ret = 1; }
      } else {
        if(data[2] == 'S') { ret = 2; }
        else { ret = 3; }
      }
  }
  printf("%d\n", ret);
  return 0;
}
//  [javascript]
/**
 * 
 * @param {String} row 
 */
function Main(row) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	let [input] = row.split("\n");
    //let items = input.split('');

    let val = {
        'SSS': 0,
        'SSR': 1,
        'SRS': 1,
        'SRR': 2,

        'RSS': 1,
        'RSR': 1,
        'RRS': 2,
        'RRR': 3,
    }
    console.log(val[input]);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const Main = (input) => {
  const line = input.split('\n')
  const weathers = line[0].split('')
  let current = 0
  let result = 0

  weathers.forEach(weather => {
    current = (weather === 'R') ? ++current : 0
    result = Math.max(result, current)
  })

  console.log(result)
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function Main(input) {
  input = input.split('\n');
  const ans = input[0].split('S').map(str => str.length).reduce((a,b) => a > b ? a : b);
  console.log(ans);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"fmt"
)

func main(){
	var s string
	fmt.Scan(&s)

	count:=0
	for index,v := range(s){
		if string(v) =="R"{
			count ++
		}else if index!=0 && count!=0{
			break
		}
	}
	fmt.Println(count)
}
//  [go]
package main

import "fmt"

var m = map[string]int{
	"SSS": 0,
	"SSR": 1,
	"SRS": 1,
	"RSS": 1,
	"SRR": 2,
	"RSR": 1,
	"RRS": 2,
	"RRR": 3,
}

func main() {
	var s string
	fmt.Scan(&s)
	fmt.Println(m[s])
}
//  [ruby]
require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
s = gets.chomp

if s.include?('RRR')
  puts 3
elsif s.include?('RR')
  puts 2
elsif s.include?('R')
  puts 1
else
  puts 0
end
//  [ruby]
require 'pp'

ch = gets.chomp!.chars
cnt = ch.count {|c| c == "R" }

if cnt == 3
    puts 3
elsif cnt == 2
    if ch[1] == "R"
        puts 2
    else
        puts 1
    end
else
    puts cnt
end
//  [ruby]
s = gets.chomp+"S"
ans = 0
cnt = 0
4.times do |i|
    if s[i] == "R"
        cnt += 1
    else
        ans = [ans,cnt].max
        cnt = 0
    end
end
puts ans
//  [swift]
import Foundation

let N = readLine()!
if(N.contains("RRR")){
  print("3")
}else if(N.contains("RR")){
  print("2")
}else if(N.contains("R")){
  print("1")
}else{
  print("0")
}
//  [swift]
import Foundation

main()

func main() {
    guard let s = readLine() else {
        return
    }
    var ans = 0, cnt = 0
    for c in s {
        if (c == "R") {
            cnt += 1
        } else {
            cnt = 0
        }
        ans = max(ans, cnt)
    }
    print(ans)
}
//  [swift]
import Foundation

main()

func main() {
    guard let s = readLine() else {
        return
    }
    let ans = s.components(separatedBy: "S").map { $0.count }.max()
    print(ans!)
}
//  [typescript]
import { readFileSync } from 'fs'
import { reverse } from 'dns'
import { start } from 'repl'
 
let lines: string[] = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
 
reader.on('line', function (line: string) {
    lines.push(line);
});
reader.on('close', function () {
    let S = lines[0]
    
    let on = S[0] == 'R' 
    let tw = S[1] == 'R'
    let th = S[2] == 'R'

    if(on && tw && th) {
        console.log(3);
    } else if ((on && tw) || (tw && th)) {
        console.log(2);
    } else if (on || tw || th) {
        console.log(1);
    } else {
        console.log(0);
    }
});
//  [typescript]
// import std = require('tstl')

{
  type Print = void | string | number | string[] | number[]
  let outs: Print[] = []

  const main = (): Print => {
    const r = _io()
    const [s] = r.ss()
    const lib = {
      RRR: 3,
      SRR: 2,
      RRS: 2,
      RSS: 1,
      SRS: 1,
      SSR: 1,
      RSR: 1,
      SSS: 0,
    }

    return lib[s]
  }

  const _io = (i = 0) => {
    const str: string = require('fs').readFileSync('/dev/stdin', 'utf8')
    const lines = str.trim().split('\n')
    const s = () => lines[i++] || ''
    const n = () => Number(s())

    const mn = (v: string[]) => v.map(Number)
    const sp = (v: string) => v.split(' ')

    const ss = () => sp(s())
    const nn = () => mn(ss())
    const nls = () => mn(lines.slice(i))
    const nnls = () => lines.slice(i).map((v) => mn(sp(v)))

    return { lines, s, n, ss, nn, nls, nnls }
  }

  outs.push(main())

  console.log(
    outs
      .map((line) => (typeof line === 'object' ? line.join(' ') : String(line)))
      .join('\n')
  )
}
//  [typescript]
function main(input: String) {
    if (input.charAt(0) === 'S') {
        if (input.charAt(1) === 'S') {
            if (input.charAt(2) === 'S') {
                console.log('0');
            } else {
                console.log('1');
            }
        } else {
            if (input.charAt(2) === 'S') {
                console.log('1');
            } else {
                console.log('2');
            }
        }
    } else {
        if (input.charAt(1) === 'S') {
            if (input.charAt(2) === 'S') {
                console.log('1');
            } else {
                console.log('1');
            }
        } else {
            if (input.charAt(2) === 'S') {
                console.log('2');
            } else {
                console.log('3');
            }
        }
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
def acinput():
    return list(map(int, input().split(" ")))

import numpy as np

a=int(input())
s=input()
if a>=3200:
    print(s)
else:
    print("red")
//  [python]
import math
import fractions
import copy
import numpy as np
import heapq
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""
#decomment when needed
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
if ip() >= 3200:
    print(input())
else:
    a = input()
    print("red")
//  [python]
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re
# import numpy as np
from scipy.misc import comb

# 再帰がやばいとき
# import sys
# sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 # 10^9 + 7

# field[H][W]
def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]

########

def main():
    a = i_inpl()
    s = input()

    if 3200 <= a:
        print(s)
    else:
        print("red")

if __name__ == "__main__":
    main()
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// AtCoder_A
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		sc.nextLine();
		String s = sc.nextLine();

		// 出力
		if(a >= 3200) {
			System.out.println(s);
		} else {
			System.out.println("red");

		}
	    // Scannerクラスのインスタンスをクローズ
		sc.close();
	}
}
//  [cpp]
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <stdio.h>
#include <string.h>
using ll = long long;

//LLONG_MAX
#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;

int a;
string s;

signed main()
{
	cin >> a;
	cin >> s;
  
  REP(i, 100000) cerr << "test" << endl;

	if (a >= 3200) cout << s << endl;
	else cout << "red" << endl;
}
//  [c]
#include<stdio.h>
int main(void)
{
  int a;
  char s[20];
  scanf("%d %s",&a,s);
  if(a>=3200){
    printf("%s\n",s);
  }else{
    puts("red");
  }
  return 0;
}
//  [c]
#include <stdio.h>
 
int main(void)
{
    int a;
    char s[11];
 
    scanf("%d %s", &a, &s);
 
    if (a >= 3200) printf("%s", s);
    else printf("red");
 
    return 0;
}
//  [c]
#include<stdio.h>
int main(void)
{
	int a;
	char s[11];
	scanf("%d%s",&a,s);
	
	if(a>=3200)
	printf("%s",s);
	
	else
	puts("red");
	

	return 0;
}
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0]);
    const S = arg[1];
    
    console.log(A >= 3200 ? S : "red");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict'

const main = (INPUT) => {
  const input = INPUT.split('\n')
  const a = input[0]
  const s = input[1]
  if (a >= 3200) {
    console.log(s)
  } else {
    console.log('red')
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function Main(input) {
 
    var a = new Number(input.split('\n')[0]);
    var s = input.split('\n')[1];
 
    console.log(a >= 3200 ? s : "red");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	a := getStdinInt()
	s := getStdin()

	if a >= 3200 {
		fmt.Printf("%s\n", s)
	} else {
		fmt.Printf("red\n")
	}
}

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt2() (int, int) {
	list := getStdinIntArr()
	return list[0], list[1]
}
func getStdinInt3() (int, int, int) {
	list := getStdinIntArr()
	return list[0], list[1], list[2]
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinIntU64() uint64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return uint64(rtn)
}
func getStdinInt64_2() (int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1]
}
func getStdinInt64_3() (int64, int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1], list[2]
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}
func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}
func getStdinIntArrU64() []uint64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]uint64, len(list))
	for idx, val := range list {
		r, _ := strconv.ParseInt(val, 10, 64)
		rtn[idx] = uint64(r)
	}
	return rtn
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}
func abs64(n int64) int64 {
	if n < 0 {
		return -n
	}
	return n
}
func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, _ := sc.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [go]
package main

import "fmt"

func main() {
	var a int
	var s string
	fmt.Scan(&a)
	fmt.Scan(&s)

	if a >= 3200 {
		fmt.Println(s)
	} else {
		fmt.Println("red")
	}
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a int
	var s string
	fmt.Scan(&a, &s)

	if a >= 3200 {
		fmt.Println(s)
	} else {
		fmt.Println("red")
	}
}
//  [ruby]
a,s=`dd`.split
puts a.to_i<3200? 'red' : s
//  [ruby]
a = gets.chomp.to_i
s = gets.chomp
puts  a >= 3200 ? s : "red"
//  [ruby]
a = gets.to_i
s = gets.strip.to_s
if a >= 3200
  puts s
else
  puts "red"
end
//  [rust]
fn main() {
    proconio::input! {
        a: usize,
        s: String,
    }
    let ans = if a >= 3200 { s } else { "red".to_string() };
    println!("{}", ans);
}
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]
use proconio::input;
use std::collections::HashMap;
use std::collections::VecDeque;
use std::cmp::max;
use std::cmp::min;


fn main() {
    input! {
        A: i32,
        S: String,
    }

    if A >= 3200 {
        println!("{}", S);
    } else {
        println!("red");
    }
}
//  [rust]
#![allow(unused_imports)]

use proconio::{input, fastout};
use proconio::marker::*;

#[fastout]
fn main() {
    input! {
    a: usize,
    s: String
    }
    let ans = if a >= 3200 {s} else {"red".to_string()};
    println!("{}", ans);
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let s = readInts()
let a = s[0]

let color = readLine()!

if a>=3200 { 
  print(color)
} else { 
  print("red")
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
 
let num=readInts()
let a=num[0]

let str=readLine()!

if a<3200{
  print("red")
}else{
  print(str)
}
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): { a: number, s: string} => {
  const a = +lines[0]
  const s = lines[1]
  const obj = { a, s }
  debug(obj)
  return obj
}
// solver
export const solve = (lines: string[]): string => {
  const { a, s } = parseLines(lines)
  return 3200 <= a ? s : 'red'
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let [a,b]=[nin(),sin()]
  out(a>=3200?b:"red")
}
main()
//  [typescript]
'use strict'
function main(input: string) {
    const n: number = Number(input.split('\n')[0]);
    if (n >= 3200) {
        console.log(input.split('\n')[1]);
        return;
    }
    console.log("red");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
#! /usr/bin/env python
# coding: utf-8

import numpy as np
import math

def slove(a, b):
    return math.ceil((a + b)/2)

if __name__ == "__main__":
    ab = input().split()
    a = int(ab[0])
    b = int(ab[1])
    print(slove(a, b))
//  [python]
a,b = map(int,input().split())
import numpy
print(int(numpy.ceil((a+b)/2)))
//  [python]
a, b = list(map(int, input().split()))
x = (a + b) / 2.0
import numpy as np
print(int(np.ceil(x)))
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		if((a + b) % 2 == 0) {
			System.out.println((a + b) / 2);
		} else {
			System.out.println((a + b) / 2 + 1);
		}
	}
}
//  [java]
import java.util.*;

public class Main{
  public static void main(String[] args) throws Exception{
	Scanner sc = new Scanner(System.in);
    List<Integer> numList = new ArrayList<>();
    while(sc.hasNextInt()){
        numList.add(sc.nextInt());
    }
    int total = numList.stream().reduce(0,(s1,s2) -> s1 + s2);
    double result = Math.ceil(total / 2.0);
    System.out.println((int)result);
  }
}
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        double a = sc.nextInt();
        double b = sc.nextInt();
        System.out.println(Math.round((a+b)/2));
    }
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

#define fastio 			ios::sync_with_stdio(0);	cin.tie(0); cout.tie(0);  cout<<fixed;  cout<<setprecision(12);
#define randomINT 		mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define	newl 			cout<<"\n"
#define DISP(as)		for(auto it : as) cout<<it<<" ";newl;
#define all(x)         	(x).begin(),(x).end()
#define mset(x,val)    	memset(x,val,sizeof(x))
#define newl           	cout<<"\n"
#define pb             	push_back
#define mp             	make_pair
#define f 				first
#define s 				second
#define dline          cerr<<"///REACHED///\n";
#define deb1(x)        cerr<<#x<<" = "<<x<<'\n';
#define deb2(x,y)      cerr<<'['<<#x<<','<<#y<<"] = "<<'['<<x<<','<<y<<']'<<'\n';
#define deb3(x,y,z)    cerr<<'['<<#x<<','<<#y<<','<<#z<<"] = "<<'['<<x<<','<<y<<','<<z<<']'<<'\n';

typedef long long 				ll;
typedef long double 			ld;
typedef vector<ll> 				vll;
typedef pair<ll , ll> 			pll;
typedef pair<ld, ld> 			pld;
typedef unordered_map<ll, ll> 	um;
typedef vector<pll> 			vpll;

const ll 	MAX5 	= 	1e+5 + 7;
const ll 	MAX7 	= 	1e+7 + 7;
const ll 	MAXN 	= 	MAX7;
const ll   	INF   	=  	0x7f7f7f7f7f7f7f7f;
const int  	INFi 	=  	0x7f7f7f7f;
const ll 	MOD		=  	1e+9 + 7;

vll adj[MAXN]; ll visit[MAXN] = {};
int dx8[] = {0, 1, 1, 1, 0, -1, -1, -1}, dy8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dx4[] = {0, 1, 0, -1}, dy4[] = {1, 0, -1, 0};

// <------------- Declare Variables Here ------------> //

ll T = 1;
ll n, x, m, y, k;
string s;


// <------------- Implement Functions Here ----------> //


// <------------- Start of main() -------------------> //

void MAIN() {
	cin >> n >> m;
	cout<<(n+m+1)/2;
	
}

int main() {
	fastio; randomINT;
	//cin >> T;
	while (T--) {
		MAIN();
	}
	return 0;
}