import java.io.BufferedInputStream
import java.io.File
import java.io.PrintWriter
import kotlin.system.measureTimeMillis

inline fun TIME(f:()->Unit){
    val t = measureTimeMillis(){
        f()
    }
    println("$t ms")
}

object IO{
    private const val BS = 1 shl 16
    private const val NC = 0.toChar()
    private val buf = ByteArray(BS)
    private var bId = 0
    private var size = 0
    private var c = NC

    var warningActive = true
    var fakein = StringBuilder()

    private var IN: BufferedInputStream = BufferedInputStream(System.`in`, BS)
    val OUT: PrintWriter = PrintWriter(System.out)

    private val char: Char
        get() {
            while (bId == size) {
                size = IN.read(buf) // no need for checked exceptions
                if (size == -1) return NC
                bId = 0
            }
            return buf[bId++].toChar()
        }

    fun nextInt(): Int {
        var neg = false
        if (c == NC) c = char
        while (c < '0' || c > '9') {
            if (c == '-') neg = true
            c = char
        }
        var res = 0
        while (c in '0'..'9') {
            res = (res shl 3) + (res shl 1) + (c - '0')
            c = char
        }
        return if (neg) -res else res
    }
    fun nextLong(): Long {
        var neg = false
        if (c == NC) c = char
        while (c < '0' || c > '9') {
            if (c == '-') neg = true
            c = char
        }
        var res = 0L
        while (c in '0'..'9') {
            res = (res shl 3) + (res shl 1) + (c - '0')
            c = char
        }
        return if (neg) -res else res
    }
    fun nextString():String{
        val ret = StringBuilder()
        while (true){
            c = char
            if(!isWhitespace(c)){ break}
        }
        ret.append(c)
        while (true){
            c = char
            if(isWhitespace(c)){ break}
            ret.append(c)
        }
        return ret.toString()
    }
    fun isWhitespace(c:Char):Boolean{
        return c == ' ' || c == '\n' || c == '\r' || c == '\t'
    }
    fun rerouteInput(){
        if(warningActive){
            put("You forgot to disable tests you digital dummy!")
            println("You forgot to disable tests you digital dummy!")
            warningActive = false
        }
        val S = fakein.toString()
        println("New Case ")
        println(S.take(80))
        println("...")
        fakein.clear()
        IN = BufferedInputStream(S.byteInputStream(),BS)
    }
    fun takeFile(name:String){
        IN = BufferedInputStream(File(name).inputStream(),BS)
    }
}
fun put(aa:Any){ IO.OUT.println(aa)}
fun done(){ IO.OUT.close() }
fun share(aa:Any){
    if(aa is IntArray){IO.fakein.append(aa.joinToString(" "))}
    else if(aa is LongArray){IO.fakein.append(aa.joinToString(" "))}
    else if(aa is List<*>){IO.fakein.append(aa.toString())}
    else{IO.fakein.append(aa.toString())}
    IO.fakein.append("\n")
}

val getint:Int get() = IO.nextInt()
val getlong:Long get() = IO.nextLong()
val getstr:String get() = IO.nextString()
fun getline(n:Int):IntArray{
    return IntArray(n){getint}
}
fun getlineL(n:Int):LongArray{
    return LongArray(n){getlong}
}
fun getbinary(n:Int, asTrue:Char):BooleanArray{
    val str = getstr
    return BooleanArray(n){str[it] == asTrue}
}

val List<Char>.ret:String
get() = this.joinToString("")
var dmark = -1
infix fun Any.dei(a:Any){
    //does not stand for anything it is just easy to type, have to be infix because kotlin does not have custom prefix operators
    dmark++
    var str = "<${dmark}>   "
    debug()
    if(this is String){ str += this
    }else if(this is Int){ str += this.toString()
    }else if(this is Long){ str += this.toString()
    }else{ str += this.toString()}
    if(a is List<*>){ println("$str : ${a.joinToString(" ")}")
    }else if(a is IntArray){ println("$str : ${a.joinToString(" ")}")
    }else if(a is LongArray){ println("$str : ${a.joinToString(" ")}")
    }else if(a is BooleanArray){ println("$str :${a.map{if(it)'1' else '0'}.joinToString(" ")}")
    }else if(a is Array<*>){
        println("$str : ")
        for(c in a){if(c is IntArray){println(c.joinToString(" "))}
        else if(c is LongArray){println(c.joinToString(" "))}
        else if(c is BooleanArray){println(c.map { if(it) '1' else '0' }.joinToString(""))
        }

        }
        println()
    }else{ println("$str : $a")
    }
}
val just = " " // usage: just dei x , where x is the debug variable
fun crash(){
    throw Exception("Bad programme")} // because assertion does not work
fun assert(a:Boolean){
    if(!a){
        throw Exception("Failed Assertion")
    }}
enum class solveMode {
    real, rand, tc
}
object solve{
    var mode:solveMode = solveMode.real
    var tcNum:Int = 0
    var rand:()->Unit = {}
    var TC:MutableMap<Int,()->Unit> = mutableMapOf()
    var answersChecked = 0
    var tn:Long = 0
    fun cases(onecase:()->Unit){
        val t = if(mode == solveMode.real){if(singleCase) 1 else getint} else if(mode == solveMode.tc){1 } else randCount
        //safety checks
        if(pI != 998_244_353 && pI != 1_000_000_007){
            throw Exception("Modding a wrong prime!")
        }
        if(withBruteForce){
            println("Brute force is active")
        }

        if(t == 1 && mode != solveMode.real){
            tn = System.currentTimeMillis()
        }
        repeat(t){
            if(mode == solveMode.tc){
                TC[tcNum]?.let { it() }
                IO.rerouteInput()
            }else if(mode == solveMode.rand){
                rand()
                IO.rerouteInput()
            }
            onecase()
        }
        if(t == 1 && mode != solveMode.real){
            val dt = System.currentTimeMillis() - tn
            println("Time $dt ms ")
        }
    }
    inline fun singleCase(a:solve.()->Unit){
        val t = if(mode != solveMode.rand){1} else randCount
        repeat(t) { a() }
    }
    fun rand(a:()->Unit){
        this.rand = a
    }
    fun tc(id:Int = 0,a:()->Unit){
        TC[id] = a
    }
    fun usetc(a:Int = 0 ){
        this.tcNum = a
        this.mode = solveMode.tc
    }
    fun userand(){
        this.mode = solveMode.rand
    }
}
inline fun<T> T.alsoBrute(cal:() -> T){
    if(!withBruteForce) return
    val also = cal()
    if(this != also){
        println("Checking failed: Got ${this} Brute ${also}")
        crash()
    }
}
// 1. Modded
const val p = 998244353L
const val pI = p.toInt()
fun Int.adjust():Int{ if(this >= pI){ return this  - pI }else if (this < 0){ return this + pI };return this }
fun Int.snap():Int{ if(this >= pI){return this - pI} else return this}
infix fun Int.modM(b:Int):Int{ return ((this * 1L * b) % pI).toInt() }
infix fun Int.modPlus(b:Int):Int{ val ans = this + b;return if(ans >= pI) ans - pI else ans }
// 2. DP initial values
const val plarge = 1_000_000_727
const val nlarge = -plarge
const val phuge = 2_727_000_000_000_000_000L
const val nhuge = -phuge
// 3. conveniecen conversions
val Boolean.chi:Int get() = if(this) 1 else 0 //characteristic function
val Char.code :Int get() = this.toInt() -  'a'.toInt()
//3. hard to write stuff
fun IntArray.put(i:Int,v:Int){ this[i] = (this[i] + v).adjust() }
val mint:MutableList<Int> get() = mutableListOf<Int>()
val mong:MutableList<Long> get() = mutableListOf<Long>()
//4. more outputs
fun List<Char>.conca():String = this.joinToString("")
val CharArray.conca :String get() = this.joinToString("")
val IntArray.conca :String get() = this.joinToString(" ")
@JvmName("concaInt")
fun List<Int>.conca():String = this.joinToString(" ")
val LongArray.conca:String get() = this.joinToString(" ")
@JvmName("concaLong")
fun List<Long>.conca():String = this.joinToString(" ")
//5. Pair of ints
const val longmask = (1L shl 32) - 1
fun makepair(a:Int, b:Int):Long = (a.toLong() shl 32) xor (longmask and b.toLong()) // remember positev sonly
val Long.first get() = (this ushr 32).toInt()
val Long.second get() = this.toInt()
//6. strings
val String.size get() = this.length
const val randCount = 100

infix fun Int.divCeil(b:Int):Int{
    //Positives numbers only!
    if(this == 0) {
        return 0
    }
    return (this-1)/b + 1
}
infix fun Long.divCeil(b:Long):Long{
    //Positives numbers only!
    if(this == 0L) {
        return 0
    }
    return (this-1)/b + 1
}

infix fun Long.modM(b:Long):Long{
    return (this * b) % p
}
//infix fun Int.modPlus(b:Int):Int{
//    val ans = this + b
//    return if(ans >= pI) ans - pI else ans
//}
infix fun Int.modMinus(b:Int):Int{
    val ans = this - b
    return if(ans < 0) ans + pI else ans
}
infix fun Int.modDivide(b:Int):Int{
    return this modM (b.inverse())
}
fun Int.additiveInverse():Int{
    return if(this == 0) 0 else pI - this
}

fun intPow(x:Int,e:Int,m:Int):Int{
    var X = x
    var E =e
    var Y = 1
    while(E > 0){
        if(E % 2 == 0){
            X = ((1L * X * X) % m).toInt()
            E = E shr 1
        }else{
            Y = ((1L * X * Y) % m).toInt()
            E -= 1
        }
    }
    return Y
}
fun intPowEXP(x:Int,e:Long,m:Int):Int{
    var X = x
    var E =e
    var Y = 1
    while(E > 0){
        if(E % 2 == 0L){
            X = ((1L * X * X) % m).toInt()
            E = E shr 1
        }else{
            Y = ((1L * X * Y) % m).toInt()
            E -= 1
        }
    }
    return Y
}

fun pow(x:Long,e:Long,m:Long):Long{
    var X = x
    var E =e
    var Y = 1L
    while(E > 0){
        if(E % 2 == 0L){
            X = (X * X) % m
            E /= 2
        }else{
            Y = (X * Y) % m
            E -= 1
        }
    }
    return Y
}
fun Long.inverse():Long{
    return pow(this,p-2,p)
}
fun Int.inverse():Int{
    return intPow(this,pI-2,pI)
}
fun min_rem(m:Int, r:Int, c:Int):Int {
    if(c < 1){
        return Int.MIN_VALUE
    }else if(r == 0){
        return 0
    }else{
        val step = m % r
        val mx = ((1L * c * r) /m ).toInt()
        val t = max_rem(r,step,mx)
        return r- t
    }
}
fun max_rem(m:Int, r:Int, c:Int):Int {
    if(r == 0|| c <= m/r){
        return r * c
    }else{
        val step =  m % r
        val mx = ((1L * (c+1) * r )/m).toInt()
        val t = min_rem(r,step,mx)
        return  m - t
    }
}
fun Int.reconstruct():String{
    val num = min_rem(pI,this, 10000)
    val denom = (this modDivide num).inverse()
    return "$num / $denom"
}

//make this int instead
class FACT{
    companion object {
        var store = IntArray(0)
        var invStore = IntArray(0)

        var slowStore:IntArray = IntArray(0)

        fun preCal(upto:Int){
            store = IntArray(upto+1)
            invStore = IntArray(upto + 1 )
            store[0] = 1
            invStore[0] = 1

            for(i in 1..upto) {
                store[i] = store[i-1] modM i
                invStore[i] = invStore[i-1] modM (i.inverse())
            }
        }
        fun choose(n:Int,r:Int):Int{
            if(r < 0 || r > n) return 0
            val a = store[n]
            val b = invStore[n-r]
            val c = invStore[r]
            return (a modM b) modM c
        }

        fun bigChoose(n:Int,r:Int):Int{
            var ret = 1
            for(i in 0 until r){
                ret = ret modM (n - i)
            }
            ret = ret modM (invStore[r])
            return ret
        }

    }
}

fun debug(){}
const val withBruteForce = false
const val singleCase = true
fun main(){
    FACT.preCal(300)
    solve.cases{

        val n = getint
        val k = getint

        //phrases, MAX
        val DP = Array(n){IntArray(k+1)}
        val sum = Array(n){IntArray(k+1)}

        DP[0][0] = FACT.store[n-1]
        for(max in 0..k){
            sum[0][max] = FACT.store[n-1]
        }
//        sum[0][0] = FACT.store[n]

        for(p in 1 until n){
            for(max in 1..k){
                var now = 0
                var totalop = 0
                for(op in p-1 downTo 0 ){
                    totalop += op
                    now = now modPlus (sum[op][max-1] modM FACT.invStore[p-op] modM intPow(k-max+1,totalop,pI))
                }
                DP[p][max] = now
            }
            for(max in 0..k){
                sum[p][max] = DP[p][max]
                if(max > 0){
                    sum[p][max] = sum[p][max-1] modPlus sum[p][max]
                }
            }
        }
        var ret = 0
        for(c in DP.last()){
            ret = ret modPlus c
        }

        put(ret)

    }
    done()
}

/*

3 3

costs are
1,1,2,..,n

1 2 3 3 4 5
1 2 3 3 4 5

1 2
2 1
3 4
4 3
max of hte two things then product

 */


fun main() {
    val r = System.`in`.bufferedReader()
    val s = StringBuilder()
    //val (n, t) = r.readLine()!!.split(" ").map { it.toInt() }
    //val book = r.readLine()!!.split(" ").map { it.toLong() }
    val (n, a, b) = r.readLine()!!.split(" ").map { it.toInt() }
    //val l1 = listOf(a..n-1)
    val l3 = List(n-a){a+it}
    //println(l3)
    //val l2 = listOf((n-b-1)..n-1)
    val l4 = List(b+1){n-b-1+it}
    //println(l4)
    var ans = 0
    for (i in l3){
        loop@for (j in l4){
            if (i==j){
                ans++
                break@loop
            }
        }
    }
    println(ans)
}


import kotlin.math.min

fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    val (numPeople, a, b) = readInts()
    print(min(numPeople - a, b + 1))
}


import java.io.*
import java.util.*

class ProblemIO(val rd: BufferedReader, val wr: PrintWriter) {
    companion object {
        fun console() = ProblemIO(BufferedReader(InputStreamReader(System.`in`)), PrintWriter(System.out))
        fun files(inputFilename: String, outputFilename: String) =
                ProblemIO(BufferedReader(FileReader(File(inputFilename))), PrintWriter(File(outputFilename)))
    }

    var tok = StringTokenizer("")

    fun close() { rd.close(); wr.close() }
    fun <T> print(v: T) = wr.print(v)
    fun <T> println(v: T) = wr.println(v)
    fun readToken(): String {
        while (!tok.hasMoreTokens()) tok = StringTokenizer(rd.readLine())
        return tok.nextToken()
    }
    fun readLine(): String {
        tok = StringTokenizer("")
        return rd.readLine()
    }
    fun readInt(): Int = readToken().toInt()
    fun readLong(): Long = readToken().toLong()
}

fun main(args: Array<String>) {
    Thread({ val io = ProblemIO.console(); solve(io); io.close() }).start()
}

fun solve(io: ProblemIO) {
    val n = io.readInt()
    val a = io.readInt()
    val b = io.readInt()
    var res = 0
    for (i in 0 .. n - 1) {
        if (i < a) continue
        if (n - 1 - i > b) continue
        ++res
    }
    io.println(res)
}


fun main() {
    val (n, m,k) = readLine()!!.split(' ').map { it.toInt() }
    println(Math.min(n-m,k+1))
}


fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    val (numPeople, a, _) = readInts()
    print(numPeople - a)
}


import java.util.*

fun main(atgs: Array<String>){
    val sc = Scanner(System.`in`)
    val n: Int = 5
    var sum = 0
    var num = Array<Int>(100){0}
    for (i in 0 until n){
        var x = sc.nextInt()
        num[x]++
        sum += x
    }
    var ans = sum
    for (i in 1 until 100){
        if (num[i] > 1){
            if (num[i] == 2) ans = if (ans < sum-2*i) ans else sum-2*i
            else ans = if (ans < sum-3*i) ans else sum-3*i
        }
    }
    println(ans)
}


fun main(){
var d:Int
d=0
 var a = Array<Int>(101){0}
 var x=readLine()!!.split(' ').map(String::toInt)
 for(i in 0..4){
    a[x[i]]++;
    d+=x[i]
 }
 var c:Int
 c=d
 for(i in 1..100){
    if(a[i]>=3){
        if((d-3*i)<c) c=d-3*i
    }
    else if(a[i]==2) if((d-2*i)<c) c=d-2*i
 }
 println(c)
}


import java.lang.String.format
import java.util.*
import kotlin.math.*
import kotlin.system.exitProcess

private fun readLn()=readLine()!! // string line
private fun readInt()=readLn().toInt() // single int
private fun readLong()=readLn().toLong() // single long
private fun readDouble()=readLn().toDouble() // single double
private fun readStrings()=readLn().split(" ") // list of strings
private fun readInts()=readStrings().map { it.toInt() } // list of ints
private fun readLongs()=readStrings().map { it.toLong() } // list of longs
private fun readDoubles()=readStrings().map { it.toDouble() } // list of doubles
fun main(){
    val reader=Scanner(System.`in`)
    var p=Array<Int>(5){0}
    var e=0
    var f=0
    for(i in 0..4){
        p[i]=reader.nextInt()
        e+=p[i]
    }
    p.sort()
    var d=1
    var i=1
    for(i in 1..4){
        if(p[i]==p[i-1]){
            d++
        }
        else{
            if(d==2){
                f=max(p[i-1]*d,f)
            }
            if(d>2){
                f=max(p[i-1]*3,f)
            }
            d=1
        }
    }
    if(d==2){
        f=max(p[4]*d,f)
    }
    if(d>2){
        f=max(p[4]*3,f)
    }
    print(e-f)
}


import java.util.*
import kotlin.collections.ArrayList

fun main() {
    var sc = Scanner(System.`in`)
    var list = ArrayList<Int>()
    list.add(sc.nextInt())
    list.add(sc.nextInt())
    list.add(sc.nextInt())
    list.add(sc.nextInt())
    list.add(sc.nextInt())

    Collections.sort(list)

    var array = Array(102,{0})

    var i = 0
    while (i<list.size){
        array[list[i]]++
        i++
    }
    var j = 0
    var max = Int.MIN_VALUE
    var flag = false
    while (j<array.size){
        var two = 0
        if (array[j]==2){
            flag = true
          two+=j*array[j]
            if (two>max){
                max = two
            }
        }else if (array[j]>=3){
            flag = true
            two+=3*j
            if (two>max){
                max = two
            }
        }
        j++
    }

   if (flag){
       println(list.sum()-max)
   }else{
       println(list.sum())
   }
}


import java.util.*

fun main(atgs: Array<String>){
    val sc = Scanner(System.`in`)
    val n: Int = 5
    var sum = 0
    var num = Array<Int>(101){0}
    for (i in 0 until n){
        var x = sc.nextInt()
        num[x]++
        sum += x
    }
    var ans = sum
    for (i in 1 until 101){
        if (num[i] > 1){
            if (num[i] == 2) ans = if (ans < sum-2*i) ans else sum-2*i
            else ans = if (ans < sum-3*i) ans else sum-3*i
        }
    }
    println(ans)
}


import java.util.*

fun main() {
    val jin = Scanner(System.`in`)
    val n = jin.nextLong()
    val k = jin.nextLong()
    println(if ((n / k) % 2L == 1L) "YES" else "NO")
}


import java.util.*

fun main(args: Array<String>) {
    var scanner = Scanner(System.`in`)

    var n = scanner.nextLong()
    var k = scanner.nextLong()

    var t = n / k

    if (t % 2 == 0L) {
        print("NO")
    } else {
        print("YES")
    }
    scanner.close()
}


fun main(args : Array<String>) = with(java.util.Scanner(System.`in`)){
    var n = nextLong()
    var k = nextLong()
    var res : Long = n/k
    if(res%2 == 0L) println("NO")
    else println("YES")
}


fun main() {
    fun readLongs() = readLine()!!.split(" ").map(String::toLong)

    val (n, k) = readLongs()
    print (if ((n / k) % 2L == 1L) "YES" else "NO")
}


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.util.StringTokenizer

fun main(args: Array<String>) {
    val sc = FastScanner(System.`in`)

    val n = sc.nextLong()
    val k = sc.nextLong()

    println(if ((n / k) % 2 == 0L) "NO" else "YES")

}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}


import java.util.Scanner

fun main(args : Array<String>) {
    val scanner = Scanner(System.`in`)
    var n = scanner.nextLong()
    var k = scanner.nextLong()
    var r: Long = n/k
    print(if (r%2==1L) "YES" else "NO")
}


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val n = sc.nextLong()
    val k = sc.nextLong()
    val q = n / k
    println(if (q % 2 == 0L) "NO" else "YES")
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}


fun main() {
    val r = System.`in`.bufferedReader()
    val s = StringBuilder()
    //val n = r.readLine()!!.toInt()
    val (a, b) = r.readLine()!!.split(" ").map { it.toLong() }
    when(a/b%2){
        0L -> println("NO")
        else -> println("YES")
    }
}


import java.io.BufferedReader
import java.io.InputStreamReader
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner()
    var n = sc.nxtInt()
    var k = sc.nxtInt()
    println(if((n/k)%2==1)"YES" else "NO")
}

class Scanner(){
    var br:BufferedReader?=null
    var st:StringTokenizer?=null
    init {
        br = BufferedReader(InputStreamReader(System.`in`))
    }
    private fun tokenize()
    {
        while(st==null || !st!!.hasMoreTokens())st = StringTokenizer(br!!.readLine())
    }
    fun readLine():String{
        return br!!.readLine()
    }
    fun nxt():String
    {
        tokenize()
        return st!!.nextToken()
    }

    fun nxtInt():Int{
        return nxt().toInt()
    }
    fun nxtDouble():Double
    {
        return nxt().toDouble()
    }
    fun nxtString():String
    {
        return nxt()
    }
}


fun main(args : Array<String>) = with(java.util.Scanner(System.`in`)){
    var n = nextInt()
    var k = nextInt()
    var res : Int = n/k
    if(res%2==0) println("NO")
    else println("YES")
}


import java.util.*

fun main(args: Array<String>) {
    var scanner = Scanner(System.`in`)

    var n = scanner.nextInt()
    var k = scanner.nextInt()

    var t = n / k

    if (t % 2 == 0) {
        print("NO")
    } else {
        print("YES")
    }
    scanner.close()
}


import java.io.*
import java.util.*

fun main(args: Array<String>) {
    solve(System.`in`, System.out)
}

val MAX_N = (1e6 + 10).toInt()
val INF = (1e9 + 7).toInt()
val MOD = (1e9 + 7).toInt()

fun solve(input: InputStream, output: OutputStream) {
    val reader = InputReader(BufferedInputStream(input))
    val writer = PrintWriter(BufferedOutputStream(output))

    solve(reader, writer)
    writer.close()
}

fun solve(reader: InputReader, writer: PrintWriter) {
    val n = reader.nextInt()
    val ans = n / 2 + 1
    writer.println(ans)
}

class InputReader(stream: InputStream) {
    val reader: BufferedReader
    var tokenizer: StringTokenizer? = null

    init {
        reader = BufferedReader(InputStreamReader(stream), 32768)
        tokenizer = null
    }

    operator fun next(): String {
        while (tokenizer == null || !tokenizer!!.hasMoreTokens()) {
            try {
                tokenizer = StringTokenizer(reader.readLine())
            } catch (e: IOException) {
                throw RuntimeException(e)
            }

        }
        return tokenizer!!.nextToken()
    }

    fun nextInt(): Int {
        return Integer.parseInt(next())
    }

    fun nextLong(): Long {
        return java.lang.Long.parseLong(next())
    }

    fun nextArrayInt(count: Int): IntArray {
        return nextArrayInt(0, count)
    }

    fun nextArrayInt(start: Int, count: Int): IntArray {
        val a = IntArray(start + count)
        for (i in start until start + count) {
            a[i] = nextInt()
        }
        return a
    }

    fun nextArrayLong(count: Int): LongArray {
        val a = LongArray(count)
        for (i in 0 until count) {
            a[i] = nextLong()
        }
        return a
    }
}


import kotlin.math.*
fun main(args: Array<String>){
	val n  = readLine()!!.toLong()
	println((n/2).toLong()+1)
}


import java.lang.Math.floor
//   1 2 3 4 5 6 7 8 9
// 0,1,2,2,3,3,4,4,5,5
fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    if(n == 0) print(0)
    else if(n == 1) print(1)
    else print(floor(n.toDouble() / 2).toInt() + 1)
}


import java.util.*

fun main (args: Array<String>) {
    val input = Scanner(System.`in`)
    val n = input.nextInt()

    println(1 + n / 2)
}


fun main(args: Array<String>) {
    readLine()!!.toInt().let {
        println(when{
            it < 3 -> it
            else -> 1 + it/2
        })
    }
}


import kotlin.math.*
fun main(args: Array<String>){
	val n  = readLine()!!.toLong()
	var lastmod = 0L
	var counter = 0
	for (i in 1..n){
		val remainder = n.rem(i)
		val modulo = (n/i).toLong()
		//println("$n % $i: $modulo remains $remainder")
		if (modulo != lastmod){
			//println("OK!")
			lastmod = modulo
			counter++
			if((remainder/modulo >= 1) and (modulo > 1)){
				//println("Plus:${remainder/modulo}")
				counter++
			}
		}
	}
	println(counter)
}


import kotlin.math.*
fun main(args: Array<String>){
	val n  = readLine()!!.toLong()
	var lastmod = 0L
	var counter = 0
	var lastrem = 0L
	for (i in 1..n){
		val remainder = n.rem(i)
		val modulo = (n/i).toLong()
		println("$n % $i: $modulo remains $remainder")
		if (modulo != lastmod){
			println("OK!")
			lastmod = modulo
			lastrem = remainder
			counter++
			if((remainder/modulo >= 1) and (modulo > 1)){
				println("Plus:${remainder/modulo}")
				counter++
			}
		}
	}
	println(counter)
}


import kotlin.math.*
fun main(args: Array<String>){
	val n  = readLine()!!.toLong()
	var lastRes = 0L
	var counter = 0
	for (i in 1..n){
		val remainder = n.rem(i)
		val modulo = (n/i).toLong()
		//println("$n % $i: $modulo remains $remainder")
		if ((modulo != lastRes) and (i > counter)){
			lastRes = modulo
			counter++
			if (remainder >= modulo){
				counter++
			}
		}
	}
	println(counter-1)
}


import java.lang.Math.floor

fun main(args: Array<String>) {
    val n = readLine()!!.toDouble()
    print( (floor(n/2) + floor(n/5)).toInt() )
}


import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val guests = sc.next()

    val doors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    val e = Array(26) { -1 }
    for (i in 0 until doors.length) {
        e[i] = guests.indexOfLast { it == doors[i] }
    }

    val opened = mutableSetOf<Char>()

    var max = -1
    for (i in 0 until n) {
        val d = guests[i]
        if (!opened.contains(d)) opened.add(d)
        else {
            max = Math.max(max, opened.size)
            if (e[doors.indexOf(d)] == i) opened.remove(d)
        }
        max = Math.max(max, opened.size)
    }

    println(if (k >= max) "NO" else "YES")

}


import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val guests = sc.next()

    val doors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    val e = Array(26) { -1 }
    for (i in 0 until doors.length) {
        e[i] = guests.indexOfLast { it == doors[i] }
    }

    val opened = mutableSetOf<Char>()

    var max = -1
    for (i in 0 until n) {
        if (!opened.contains(guests[i])) opened.add(guests[i])
        else {
            val d = guests[i]
            if (e[doors.indexOf(d)] == i) opened.remove(d)
        }
        max = Math.max(max, opened.size)

    }

    println(if (k >= max) "NO" else "YES")

}


fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    val (numGuests, numGuards) = readInts()
    val doors = readLine()!!
    val opens = IntArray(numGuests)
    val opened = BooleanArray(26)
    for ((pos, door) in doors.withIndex())
        if (!opened[door - 'A']) {
            opened[door - 'A'] = true
            opens[pos] = 1
        }
    val closed = BooleanArray(26)
    for ((pos, door) in doors.withIndex().reversed())
        if (!closed[door - 'A']) {
            closed[door - 'A'] = true
            if (pos < numGuests - 1) opens[pos + 1] += -1
        }
    var sum = 0
    for (pos in 0 until numGuests) {
        sum += opens[pos]
        if (sum > numGuards) return print("YES")
    }
    print("NO")
}


import java.io.InputStream

private val input = FastScanner()

fun main(args: Array<String>) = input.run {
    val n = nextInt()
    val k = nextInt()
    val s = nextString()!!.toCharArray().map { (it - 'A').toInt() }
    val first = IntArray('Z' - 'A' + 1) { -1 }
    val last = IntArray('Z' - 'A' + 1) { -1 }
    s.forEachIndexed { i, c ->
        if (first[c] == -1) {
            first[c] = i
        }
        last[c] = i
    }
    val sum = IntArray(n + 1)
    first.indices.forEach {
        if (first[it] != -1) {
            sum[first[it]]++
            sum[last[it] + 1]--
        }
    }
    (1..sum.lastIndex).forEach {
        sum[it] += sum[it - 1]
    }
    if (sum.any { it > k }) {
        println("YES")
    } else {
        println("NO")
    }
}

class FastScanner(private val input: InputStream = System.`in`) {
    private val sb = StringBuilder()
    private val buffer = ByteArray(4096)
    private var pos = 0
    private var size = 0

    fun nextString(): String? {
        var c = skipWhitespace()
        if (c < 0) return null

        return sb.run {
            setLength(0)

            do {
                append(c.toChar())
                c = read()
            } while (c > ' '.toInt())

            toString()
        }
    }

    fun nextLong(): Long {
        var c = skipWhitespace()

        val sign = if (c == '-'.toInt()) {
            c = read()
            -1
        } else 1

        var ans = 0L

        while (c > ' '.toInt()) {
            ans = ans * 10 + c - '0'.toInt()
            c = read()
        }

        return sign * ans
    }

    fun nextInt() = nextLong().toInt()

    private fun skipWhitespace(): Int {
        while (true) {
            val c = read()
            if (c > ' '.toInt() || c < 0) return c
        }
    }

    private fun read(): Int {
        while (pos >= size) {
            if (size < 0) return -1
            size = input.read(buffer, 0, buffer.size)
            pos = 0
        }
        return buffer[pos++].toInt()
    }
}


import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val guests = sc.next()

    val doors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    val e = Array(26) { -1 }
    for (i in 0 until doors.length) {
        e[i] = guests.indexOfLast { it == doors[i] }
    }

    val opened = mutableSetOf<Char>()

    var max = -1
    for (i in 0 until n) {
        val d = guests[i]
        if (!opened.contains(d)) opened.add(d)

        max = Math.max(max, opened.size)
        if (e[doors.indexOf(d)] == i) opened.remove(d)
    }

    println(if (k >= max) "NO" else "YES")

}


import kotlin.math.max
import kotlin.math.min

fun readIntList() = readLine()!!.split(' ').map(String::toInt).toMutableList()
fun readLongList() = readLine()!!.split(' ').map(String::toLong).toMutableList()
fun readStringList() = readLine()!!.split(' ').toMutableList()
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()

fun main(args: Array<String>) {

    val (n, k) = readIntList()
    val s = readLine()!!
    val alphabet = Array(26, { -1 })
    val lastAlphabet = Array(26, { -1 })
    s.forEachIndexed { index, ch ->
        lastAlphabet[ch - 'A'] = index
    }

    var count = 0
    var isSuccess = true
    s.forEachIndexed { index, ch ->
        val i = ch - 'A'
        if(alphabet[i] == -1)
            count ++

        if(count > k)
            isSuccess = false

        alphabet[i] = index
        if(lastAlphabet[i] == index)
            count --
    }

    if (isSuccess)
        println("NO")
    else
        println("YES")

}

class Custom(
        val p: Int,
        val s: Int
) {

}


fun main(args: Array<String>) {
    val r = java.util.Scanner(System.`in`)
    var n = r.nextInt()
    val a = r.nextInt()
    val b = r.nextInt()
    val c = Array(n,{0})
    var d : Int
    for (i in 1..a)
        c[r.nextInt()-1]=1
    for (i in 1..b) {
        val e = r.nextInt()-1
        if (c[e] == 0)
            c[e]=2
    }
    c.forEach { print("$it ") }
}


fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    val (numApples, _, _) = readInts()
    val sol = IntArray(numApples)
    val arthurLikes = readInts().toSet()
    readLine()
    for (apple in 1..numApples)
        sol[apple - 1] = if (apple in arthurLikes) 1 else 2
    print(sol.joinToString(" "))
}


import com.sun.xml.internal.fastinfoset.util.StringArray
import java.awt.List
import java.util.*
import kotlin.collections.ArrayList
import kotlin.math.min

fun main() {
    var (n, a, b) = readLine()!!.split(" ").map { it.toInt() }
    var ans = Array<Boolean>(n+1,{false})
    var ans1 = Array<Boolean>(n+1,{false})

    var list = readLine()!!.split(' ').map { ans[it.toInt()] = true }
    var list1 = readLine()!!.split(' ').map { ans1[it.toInt()] = true }

    for (i in 1..n){
        if (ans[i]){
            print("${1} ")
        }else if(ans1[i]){
            print("${2} ")
        }
    }

}


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.util.*
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min

class Solver(stream: InputStream, private val out: java.io.PrintWriter) {
  fun solve() {
    val S = ns().map{it-'0'}
    val N = S.size
    val M = ni()
    val cntDigit = IntArray(10)
    for (i in 0 until S.size) {
      cntDigit[S[i]]++
    }
    val coef = IntArray(11)
    coef[0] = 1
    for (i in 0 until 10) {
      coef[i + 1] = coef[i] * (1 + cntDigit[i])
    }
    debug(coef)
    var best = Array(coef.last()){LongArray(M)}
    var next = Array(coef.last()){LongArray(M)}
    best[0][0] = 1

    val map = IntArray(10_000) // 100 * 10 + 100 しかいかないけどたくさんつくっとく
    for (i in 0 until map.size) {
      map[i] = i % M
    }

    var pow10 = 1
    for (i in N - 1 downTo 0) {
      for (s in 0 until coef.last()) {
        for (d in 0 until 10) {
          if (i == 0 && d == 0) continue
          if ((s + coef[d]) / coef[d + 1] > s / coef[d + 1]) continue
          val ns = s + coef[d]
          for (m in 0 until M) {
            if (best[s][m] == 0L) continue
            val nm = map[m + pow10 * d]
//            debug{"s:$s m:$m d:$d ns:$ns nm:$nm"}
            next[ns][nm] += best[s][m]
          }
        }
      }
      debug{"DP($i)"}
      debugDim(next)
      val t = best
      best = next
      next = t

      pow10 = (pow10 * 10) % M
    }
    out.println(best[coef.last() - 1][0])
  }

  private val isDebug = try {
    // なんか本番でエラーでる
    System.getenv("MY_DEBUG") != null
  } catch (t: Throwable) {
    false
  }

  private var tokenizer: StringTokenizer? = null
  private val reader = BufferedReader(InputStreamReader(stream), 32768)
  private fun next(): String {
    while (tokenizer == null || !tokenizer!!.hasMoreTokens()) {
      tokenizer = StringTokenizer(reader.readLine())
    }
    return tokenizer!!.nextToken()
  }

  private fun ni() = next().toInt()
  private fun nl() = next().toLong()
  private fun ns() = next()
  private fun na(n: Int, offset: Int = 0): IntArray {
    return map(n) { ni() + offset }
  }
  private fun nal(n: Int, offset: Int = 0): LongArray {
    val res = LongArray(n)
    for (i in 0 until n) {
      res[i] = nl()
    }
    return res
  }

  private inline fun map(n: Int, f: (Int) -> Int): IntArray {
    val res = IntArray(n)
    for (i in 0 until n) {
      res[i] = f(i)
    }
    return res
  }

  private inline fun debug(msg: () -> String) {
    if (isDebug) System.err.println(msg())
  }

  private fun debug(a: LongArray) {
    debug { a.joinToString(" ") }
  }

  private fun debug(a: IntArray) {
    debug { a.joinToString(" ") }
  }

  private fun debug(a: BooleanArray) {
    debug { a.map { if (it) 1 else 0 }.joinToString("") }
  }

  private fun debugDim(A: Array<LongArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }

  /**
   * 勝手にimport消されるのを防ぎたい
   */
  private fun hoge() {
    min(1, 2)
    max(1, 2)
    abs(-10)
  }
}

fun main() {
  val out = java.io.PrintWriter(System.out)
  Solver(System.`in`, out).solve()
  out.flush()
}


import java.util.*

fun main() {

    val scanner = Scanner(System.`in`)

    val w = scanner.nextInt()
    val h = scanner.nextInt()

    var ans: Long = 0

    for (x in 0..w) {
        for (y in 0..h) {
            if (x % 2 == 0 && y % 2 == 0 && x > 0 && y > 0) {
                ans += (w - x + 1) * (h - y + 1)
            }
        }
    }

    println(ans)

}


import java.util.*

fun main() {
    var w: Int
    var h: Int

    with(Scanner(System.`in`)) {
        w = nextInt()
        h = nextInt()
    }

    var count = 0L

    for (i in w / 2 downTo 1 step 1) {
        for (j in h / 2 downTo 1 step 1) {
            count += (w - i * 2 + 1) * (h - j * 2 +1)
        }
    }
    print(count)
}


val M = 1000000007L
val N = 100005
var fact = LongArray(N)
var ifact = LongArray(N)
var t = 0

fun main(args : Array<String>) {
    val (n, m, g) = readLine().toString().split(' ').map { it.toInt() }
    t = g
    init()

    // case when there are no ones
    if (m == 0) {
        val res = if (ok(n)) 1 else 0
        println(res)
        return
    }

    var ans = 0L
    // number of zeroes before first one position
    for (i in 0..n) {
        var k = ok(i + 1)
        if (m == 1 && i == n) k = ok(i)
        if (!k) continue
        ans = (ans + C(n - i + m - 1, m - 1)) % M
    }
    println(ans)
}

fun init() {
    fact[0] = 1L
    ifact[0] = 1L
    for (i in 1..(N - 1)) {
        fact[i] = (fact[i - 1] * i) % M
        ifact[i] = binpow(fact[i], M - 2)
    }
}

fun binpow(n : Long, deg : Long) : Long {
    if (deg == 0L) return 1L
    return if (deg % 2L == 1L) {
        n * binpow(n, deg - 1) % M
    } else {
        val b = binpow(n, deg / 2L)
        b * b % M
    }
}

fun C(n : Int, k : Int) : Long {
    return if (n < k) 0
    else fact[n] * ifact[k] % M * ifact[n - k] % M
}

fun ok(zeroes : Int) = (1 - zeroes % 2 == t)


fun main(args: Array<String>) {
    var (n,m) = readLine()!!.split(' ').map(String::toInt)
    var a = readLine()!!.split(' ').map(String::toInt)
        a = a.sorted()
        print(a.last())
}


fun main(args: Array<String>) {
    var (n,m) = readLine()!!.split(' ').map(String::toInt)
    var a = readLine()!!.split(' ').map(String::toInt)
        a = a.sorted()
    if ((m >= a.last()) || (m % a.last() == 0)) {
        print(a.lastIndex + 1)
    }
    else
        print(a.last())
}


fun main() {
    var (n, m) = readLine()!!.split(" ").map{ it.toInt() }
    readLine()!!.split(" ").map{ it.toInt() }.toMutableList().let {
        var last = 0;
        while(true) {
            var count = 0
            for((i, x) in it.withIndex()) {
                if(x > 0) {
                    it[i] -= m
                    last = i + 1
                }
                if(it[i] <= 0) count++
            }
            if(count == n) break
        }
        println(last)
    }
}


import kotlin.math.pow

fun main() {
    var (n, m) = readLine()!!.split(" ").map { it.toInt() }

    var list = readLine()!!.split(" ").map { it.toInt() }

    var max = list.max()
    val map = Array(n, { 0 })
    var ans = -1
    var ans2 = 0
    if (max!! <= m) {
        ans = n
    } else {
        var count = n
        for (i in n - 1 downTo 0) {
            if (list[i] > m) {
                var temp = list[i] / m
                var temp2 = list[i] % m
                if (temp2 != 0) {
                    temp++
                }
                if (temp > ans2) {
                    ans = count
                    ans2 = temp
                }
            }
            count--
        }
    }

    println(ans)

}


fun main() {
    val (name, surname) = readLine()!!.split(" ")
    val sol = StringBuilder()
    for ((pos, c) in name.withIndex()) {
        if (c < surname.first() || pos == 0) sol.append(c)
        else break
    }
    sol.append(surname.first())
    print(sol.toString())
}


import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

private val reader = BufferedReader(InputStreamReader(System.`in`))
private val out = PrintWriter(System.out)
private var st = StringTokenizer("")

fun next(): String {
    while (!st.hasMoreTokens())
        st = StringTokenizer(reader.readLine())
    return st.nextToken()
}

fun ni() = next().toInt()
fun nl() = next().toLong()
fun nd() = next().toDouble()
fun print(obj: Any) = out.print(obj)
fun close() = out.close()

fun main(args: Array<String>) {
    val name = next()
    val secondName = next()
    print("${name.slice(1 until name.length).takeWhile { it < secondName[0] }.map { "$it" }.fold("${name[0]}") { acc, v -> "$acc$v" }}${secondName[0]}")
    close()
}


import java.util.*

fun main(args: Array<String>) = with(Scanner(System.`in`)) {
    val s = nextLine().split((" ").toRegex()).dropLastWhile({ it.isEmpty() }).toTypedArray()
    val c = s[0].toCharArray()
    val fchar = s[1].get(0)
    val sb = StringBuilder("")
    sb.append(c[0])
    for (i in 1 until c.size) {
        val a = c[i].toInt()
        val b = fchar.toInt()
        if (a < b) sb.append(a.toChar())
        else break
    }
    sb.append(fchar)
    println(sb)
}


fun main() {
    var (f, l) = readLine()!!.split(" ")
    var j = 0
    var ans = f[0].toString()
    for (i in 1 until f.length) {
        if (f[i].toInt() < l[j].toInt()) {
            ans += f[i]
        }else{
            ans+=l[j]
            println(ans)
            return
        }
    }
    ans+=l[j]
    println(ans)
}


fun main(args: Array<String>) {
    var (a, b) = readLine()!!.split(' ')
    var ans = ""
    var i = 1
    ans = ans.plus(a.get(0))
    var found: Boolean = false
    while (i < a.length) {
        if(a.get(i) < b.get(0)){
            ans = ans.plus(a.get(i))
        }
        else{
            ans = ans.plus(b.get(0))
            found = true
            break
        }
        i++
    }
    if (!found){
        ans = ans.plus(b.get(0))
    }
    println(ans)
}


fun main() {
    val (name, surname) = readLine()!!.split(" ")
    val sol = StringBuilder()
    for (c in name) {
        if (c < surname.first()) sol.append(c)
        else break
    }
    sol.append(surname.first())
    print(sol.toString())
}


fun main() {
    var (f, l) = readLine()!!.split(" ")
    var j = 0
    var ans = f[0].toString()
    for (i in 1 until f.length) {
        if (f[i].toInt() <= l[j].toInt()) {
            ans += f[i]
        }else{
            ans+=l[j]
            for (i in j until l.length-1){
                if (l[i]<l[i+1]){
                    ans+=l[i+1]
                }else{
                    println(ans)
                    return
                }
            }
            println(ans)
            return
        }
    }
    ans+=l[j]
    for (i in j until l.length-1){
        if (l[i]<l[i+1]){
            ans+=l[i+1]
        }else{
            println(ans)
            return
        }
    }
}


import java.io.PrintWriter
import kotlin.math.abs
import kotlin.math.max

fun main(args: Array<String>) {
    io.apply {

        val n = int
        val ans = when(n) {
            1 -> 1
            2, 4, 5 -> 3
            3, in 6..13 -> 5
            in 14..25 -> 7
            in 26..41 -> 9
            in 42..61 -> 11
            in 62..85 -> 13
            else -> 15
        }

        cout .. ans .. nl

    }.cout.flush()
}

// @formatter:off
private val io = object {
    private val `in` = System.`in`
    private fun ll(): Long {
        var x: Int; var q = false; var n = 0L; do x = `in`.read() while (x < 33); if (x == 45) { q = true; x = `in`.read() }
        do { n = n * 10 - x + 48; x = `in`.read() } while (x > 32); return if (q) n else -n
    }
    val int get() = ll().toInt(); val long get() = ll()
    fun ints(n: Int = int): IntArray { return IntArray(n) { int } }
    fun ints1(n: Int = int): IntArray { return IntArray(n) { int - 1 } }
    val cout = PrintWriter(System.out); val nl = "\n"
    operator fun PrintWriter.rangeTo(a: Int): PrintWriter { print(a); print(" "); return this }
    operator fun PrintWriter.rangeTo(a: Long): PrintWriter { print(a); print(" "); return this }
    operator fun PrintWriter.rangeTo(a: IntArray): PrintWriter { a.forEach { print(it); print(" ") }; return this }
    operator fun PrintWriter.rangeTo(a: String): PrintWriter { write(a); return this }
} // @formatter:on

/* ----------- */


import java.io.*
import java.math.BigDecimal
import java.math.BigInteger
import java.util.*

object programkt {
    interface Scanner {
        fun changeInputStream(inputStream: InputStream)
        fun nextInt(): Int
        fun nextLong(): Long
        fun nextDouble(): Double
        fun nextChar(): Char
        fun nextString(): String
        fun nextLine(): String
        fun nextBigInteger(): BigInteger
        fun nextBigDecimal(): BigDecimal
    }

    abstract class Task {
        //KT Extensions
        fun <T : Comparable<T>> min(a: T, b: T) = if (a > b) b else a
        fun <T : Comparable<T>> max(a: T, b: T) = if (a < b) b else a
        fun abs(a: Int) = if (a > 0) a else -(a)
        fun abs(a: Long) = if (a > 0) a else -(a)
        fun abs(a: Float) = if (a > 0) a else -(a)
        fun abs(a: Double) = if (a > 0) a else -(a)
        operator fun <T> Iterable<T>.invoke(function: (it: T) -> Unit) { this.forEach(function) }
        private fun String.prefix(pi: Array<Int>): Array<Int> {
            pi[0] = 0
            (1 until this.length) {
                var j = pi[it - 1]
                while (j > 0 && this[it] != this[j]) {
                    j = pi[j - 1]
                }
                if(this[it] == this[j]) {
                    j++
                }
                pi[it] = j
            }
            return pi
        }
        private fun String.kmpFind(pattern: String): Int {
            val m = pattern.length
            val dfa = Array(256) { IntArray(m) }
            dfa[pattern[0].toInt()][0] = 1
            var x = 0
            var j = 1
            while (j < m) {
                for (c in 0 until 256) {
                    dfa[c][j] = dfa[c][x]        // Copy mismatch cases.
                }
                dfa[pattern[j].toInt()][j] = j + 1   // Set match case.
                x = dfa[pattern[j].toInt()][x]       // Update restart state.
                j++
            }

            val n = this.length
            var i: Int = 0
            j = 0
            while (i < n && j < m) {
                j = dfa[this[i].toInt()][j]
                i++
            }
            if (j == m) return i - m    // found
            return n                    // not found
        }
        fun fuckExceptions(invoker: () -> Unit) = try { invoker.invoke() } catch (_: Throwable) {}

        enum class EdgeType {
            DIRECTED,
            UNDIRECTED
        }
        data class Vertex<T: Comparable<T>>(
                val data: T
        ) {
            override fun toString(): String = "V:$data"
        }
        data class Edge<T:Comparable<T>>(
                var source: Vertex<T>,
                var destination: Vertex<T>,
                val weight: Double?
        )
        interface Graphable<T: Comparable<T>> {
            fun createVertex(data: T): Vertex<T>
            fun add(type: EdgeType, source: Vertex<T>, destination: Vertex<T>, weight: Double? = 0.0)
            fun weight(source: Vertex<T>, destination: Vertex<T>): Double?
            fun edges(source: Vertex<T>): MutableList<Edge<T>>?
        }
        class AdjacencyList<T: Comparable<T>>: Graphable<T> {
            var adjacencyMap: MutableMap<Vertex<T>, MutableList<Edge<T>>> = mutableMapOf()

            private fun addDirectedEdge(source: Vertex<T>, destination: Vertex<T>, weight: Double?) {
                adjacencyMap[source]?.add(Edge(source = source, destination = destination, weight = weight))
            }

            private fun addUndirectedEdge(source: Vertex<T>, destination: Vertex<T>, weight: Double?) {
                addDirectedEdge(source, destination, weight)
                addDirectedEdge(destination, source, weight)
            }

            override fun createVertex(data: T): Vertex<T> {
                val vertex = Vertex(data = data)
                adjacencyMap[vertex] ?: run {
                    adjacencyMap[vertex] = mutableListOf()
                }
                return vertex
            }

            override fun add(type: EdgeType, source: Vertex<T>, destination: Vertex<T>, weight: Double?) = when(type) {
                EdgeType.DIRECTED -> addDirectedEdge(source, destination, weight)
                EdgeType.UNDIRECTED -> addUndirectedEdge(source, destination, weight)
            }

            override fun weight(source: Vertex<T>, destination: Vertex<T>): Double? {
                adjacencyMap[source]?.forEach {
                    if(it.destination == destination) return it.weight
                }
                return null
            }

            override fun edges(source: Vertex<T>): MutableList<Edge<T>>? = adjacencyMap[source]

            override fun toString(): String {
                var result = ""
                for ((vertex, edges) in adjacencyMap) {
                    var edgeString = ""
                    for ((index, edge) in edges.withIndex()) {
                        edgeString += if (index != edges.count() - 1) "${edge.destination}, "
                        else "${edge.destination}"
                    }
                    result += "$vertex ---> [ $edgeString ] \n"
                }
                return result
            }

            fun depthFirstSearch(start: Vertex<T>, end: Vertex<T>): Stack<Vertex<T>> {
                val visited: HashSet<Vertex<T>> = hashSetOf()
                val stack: Stack<Vertex<T>> = Stack()
                stack.push(start)
                visited.add(start)

                var currentVertex = stack.peek()
                loop@while (currentVertex != null && currentVertex != end) {
                    val neighbors = edges(currentVertex)
                    if(neighbors != null && neighbors.count() > 0) {
                        for(edge in neighbors) {
                            if(!visited.contains(edge.destination)) {
                                visited.add(edge.destination)
                                stack.push(edge.destination)
                                currentVertex = stack.peek()
                                continue@loop
                            }
                        }
                    } else {
                        stack.pop()
                        currentVertex = stack.peek()
                        continue
                    }

                    stack.pop()
                    currentVertex = stack.peek()
                }

                return stack
            }

            fun breadthFirstSearch() {

            }

            fun floydWarshallAlgorythm(): Pair<Array<DoubleArray>, Array<IntArray>> {
                val nVertices = this.adjacencyMap.size

                val weights = Array(nVertices) { Array(nVertices-1) { 0.0 } }
                this.adjacencyMap
                        .asSequence()
                        .map { it.value }
                        .withIndex()
                        .forEach { (index, weightsOfVertex) ->
                            weightsOfVertex.asSequence()
                                    .withIndex()
                                    .forEach { (weightIndex, weight) ->
                                        weights[index][weightIndex] = weight.weight!!
                                    }
                        }

                val dist = Array(nVertices) { DoubleArray(nVertices) { Double.POSITIVE_INFINITY } }
                for (w in weights) dist[(w[0] - 1).toInt()][(w[1] - 1).toInt()] = w[2]
                val next = Array(nVertices) { IntArray(nVertices) }
                for (i in 0 until next.size) {
                    for (j in 0 until next.size) {
                        if (i != j) next[i][j] = j + 1
                    }
                }
                for (k in 0 until nVertices) {
                    for (i in 0 until nVertices) {
                        for (j in 0 until nVertices) {
                            if (dist[i][k] + dist[k][j] < dist[i][j]) {
                                dist[i][j] = dist[i][k] + dist[k][j]
                                next[i][j] = next[i][k]
                            }
                        }
                    }
                }
                return dist to next
            }
        }

        fun <T: Comparable<T>> TreeMap<T, Array<Double>>.toAdjacencyList(type: EdgeType): AdjacencyList<T> {
            val list = AdjacencyList<T>()

            this.keys.forEach { list.createVertex(it) }
            this.entries
                    .asSequence()
                    .withIndex()
                    .forEach { (x, edge) ->
                        val vertex = list.createVertex(edge.key)
                        edge.value
                                .asSequence()
                                .withIndex()
                                .forEach { (y, weight) ->
                                    if(weight != .0 && y != x)
                                        list.add(type, vertex, list.createVertex(this.keys.elementAt(y)), weight)
                                }
                    }
            return list
        }
        //End KT Extensions

        abstract fun solve(scanner: Scanner, printer: PrintWriter)
    }

    class FastScanner: Scanner {
        var inputStream: InputStream? = null
        override fun changeInputStream(inputStream: InputStream) {
            this.inputStream = inputStream
            this.bufferedReader = BufferedReader(InputStreamReader(inputStream))
        }

        private lateinit var bufferedReader: BufferedReader
        private var stringTokenizer: StringTokenizer? = null

        private fun nextToken(): String? {
            while (stringTokenizer == null || !stringTokenizer!!.hasMoreTokens())
                stringTokenizer = StringTokenizer(bufferedReader.readLine() ?: return null)
            return stringTokenizer!!.nextToken()
        }

        override fun nextInt() = nextToken()!!.toInt()
        override fun nextLong() = nextToken()!!.toLong()
        override fun nextDouble() = nextToken()!!.toDouble()
        override fun nextChar() = bufferedReader.read().toChar()
        override fun nextString() = nextToken()!!
        override fun nextLine() = bufferedReader.readLine()!!
        override fun nextBigInteger() = BigInteger(nextToken()!!)
        override fun nextBigDecimal() = BigDecimal(nextToken()!!)
    }

    class TaskBuilder {
        private var task: Task? = null
        private var inputStream: InputStream? = null
        private var outputStream: OutputStream? = null
        private var scanner: Scanner? = null

        fun useInputSource(inputStream: InputStream): TaskBuilder {
            this.inputStream = inputStream
            return this
        }

        fun useOutputSource(outputStream: OutputStream): TaskBuilder {
            this.outputStream = outputStream
            return this
        }

        fun useInputFile(inputFileName: String): TaskBuilder {
            this.inputStream = FileInputStream(File(inputFileName))
            return this
        }

        fun useOutputFile(outputFileName: String): TaskBuilder {
            this.outputStream = FileOutputStream(File(outputFileName))
            return this
        }

        fun useScanner(scanner: Scanner): TaskBuilder {
            this.scanner = scanner
            return this
        }

        fun solveTask(task: Task): TaskBuilder {
            this.task = task
            return this
        }

        fun run() {
            when {
                task == null -> throw NullPointerException("Task cannot be null!")
                inputStream == null -> throw NullPointerException("Input cannot be null!")
                outputStream == null -> throw NullPointerException("Output cannot be null!")
                scanner == null -> throw NullPointerException("Scanner cannot be null!")
            }
            scanner!!.changeInputStream(inputStream!!)
            val printer = PrintWriter(outputStream)
            TaskRunnable(task!!, scanner!!, printer).run()

            inputStream!!.close()
            printer.close()
        }

        class TaskRunnable(
                private val task: Task,
                private val scanner: Scanner,
                private val printer: PrintWriter
        ) {
            fun run() {
                task.solve(scanner, printer)
            }
        }
    }

    @JvmStatic
    fun main(args: Array<String>) = TaskBuilder()
            .useInputSource(System.`in`)
            .useOutputSource(System.out)
            .useScanner(FastScanner())
            .solveTask(TaskA())
            .run()

    class TaskA: Task() {
        override fun solve(scanner: Scanner, printer: PrintWriter) {
            val (firstValency, secondValency, thirdValency) = scanner.nextLine()
                    .split(" ")
                    .map { it.toLong() }
            val averageValency = (firstValency + secondValency + thirdValency) / 2

            if ((firstValency + secondValency + thirdValency) % 2 != 0L ) { printer.println("Impossible"); return }

            val countOfConnectionsFirst = averageValency - thirdValency
            val countOfConnectionsSecond = averageValency - firstValency
            val countOfConnectionsThird = averageValency - secondValency

            when {
                countOfConnectionsFirst < 0 -> { printer.println("Impossible"); return }
                countOfConnectionsSecond < 0 -> { printer.println("Impossible"); return }
                countOfConnectionsThird < 0 -> { printer.println("Impossible"); return }
                else -> printer.println("$countOfConnectionsFirst $countOfConnectionsSecond $countOfConnectionsThird")
            }
        }

    }
}


import java.io.*
import java.math.BigDecimal
import java.math.BigInteger
import java.util.*

object programkt {
    interface Scanner {
        fun changeInputStream(inputStream: InputStream)
        fun nextInt(): Int
        fun nextLong(): Long
        fun nextDouble(): Double
        fun nextChar(): Char
        fun nextString(): String
        fun nextLine(): String
        fun nextBigInteger(): BigInteger
        fun nextBigDecimal(): BigDecimal
    }

    abstract class Task {
        //KT Extensions
        fun <T : Comparable<T>> min(a: T, b: T) = if (a > b) b else a
        fun <T : Comparable<T>> max(a: T, b: T) = if (a < b) b else a
        fun abs(a: Int) = if (a > 0) a else -(a)
        fun abs(a: Long) = if (a > 0) a else -(a)
        fun abs(a: Float) = if (a > 0) a else -(a)
        fun abs(a: Double) = if (a > 0) a else -(a)
        operator fun <T> Iterable<T>.invoke(function: (it: T) -> Unit) { this.forEach(function) }
        private fun String.prefix(pi: Array<Int>): Array<Int> {
            pi[0] = 0
            (1 until this.length) {
                var j = pi[it - 1]
                while (j > 0 && this[it] != this[j]) {
                    j = pi[j - 1]
                }
                if(this[it] == this[j]) {
                    j++
                }
                pi[it] = j
            }
            return pi
        }
        private fun String.kmpFind(pattern: String): Int {
            val m = pattern.length
            val dfa = Array(256) { IntArray(m) }
            dfa[pattern[0].toInt()][0] = 1
            var x = 0
            var j = 1
            while (j < m) {
                for (c in 0 until 256) {
                    dfa[c][j] = dfa[c][x]        // Copy mismatch cases.
                }
                dfa[pattern[j].toInt()][j] = j + 1   // Set match case.
                x = dfa[pattern[j].toInt()][x]       // Update restart state.
                j++
            }

            val n = this.length
            var i: Int = 0
            j = 0
            while (i < n && j < m) {
                j = dfa[this[i].toInt()][j]
                i++
            }
            if (j == m) return i - m    // found
            return n                    // not found
        }
        fun fuckExceptions(invoker: () -> Unit) = try { invoker.invoke() } catch (_: Throwable) {}

        enum class EdgeType {
            DIRECTED,
            UNDIRECTED
        }
        data class Vertex<T: Comparable<T>>(
                val data: T
        ) {
            override fun toString(): String = "V:$data"
        }
        data class Edge<T:Comparable<T>>(
                var source: Vertex<T>,
                var destination: Vertex<T>,
                val weight: Double?
        )
        interface Graphable<T: Comparable<T>> {
            fun createVertex(data: T): Vertex<T>
            fun add(type: EdgeType, source: Vertex<T>, destination: Vertex<T>, weight: Double? = 0.0)
            fun weight(source: Vertex<T>, destination: Vertex<T>): Double?
            fun edges(source: Vertex<T>): MutableList<Edge<T>>?
        }
        class AdjacencyList<T: Comparable<T>>: Graphable<T> {
            var adjacencyMap: MutableMap<Vertex<T>, MutableList<Edge<T>>> = mutableMapOf()

            private fun addDirectedEdge(source: Vertex<T>, destination: Vertex<T>, weight: Double?) {
                adjacencyMap[source]?.add(Edge(source = source, destination = destination, weight = weight))
            }

            private fun addUndirectedEdge(source: Vertex<T>, destination: Vertex<T>, weight: Double?) {
                addDirectedEdge(source, destination, weight)
                addDirectedEdge(destination, source, weight)
            }

            override fun createVertex(data: T): Vertex<T> {
                val vertex = Vertex(data = data)
                adjacencyMap[vertex] ?: run {
                    adjacencyMap[vertex] = mutableListOf()
                }
                return vertex
            }

            override fun add(type: EdgeType, source: Vertex<T>, destination: Vertex<T>, weight: Double?) = when(type) {
                EdgeType.DIRECTED -> addDirectedEdge(source, destination, weight)
                EdgeType.UNDIRECTED -> addUndirectedEdge(source, destination, weight)
            }

            override fun weight(source: Vertex<T>, destination: Vertex<T>): Double? {
                adjacencyMap[source]?.forEach {
                    if(it.destination == destination) return it.weight
                }
                return null
            }

            override fun edges(source: Vertex<T>): MutableList<Edge<T>>? = adjacencyMap[source]

            override fun toString(): String {
                var result = ""
                for ((vertex, edges) in adjacencyMap) {
                    var edgeString = ""
                    for ((index, edge) in edges.withIndex()) {
                        edgeString += if (index != edges.count() - 1) "${edge.destination}, "
                        else "${edge.destination}"
                    }
                    result += "$vertex ---> [ $edgeString ] \n"
                }
                return result
            }

            fun depthFirstSearch(start: Vertex<T>, end: Vertex<T>): Stack<Vertex<T>> {
                val visited: HashSet<Vertex<T>> = hashSetOf()
                val stack: Stack<Vertex<T>> = Stack()
                stack.push(start)
                visited.add(start)

                var currentVertex = stack.peek()
                loop@while (currentVertex != null && currentVertex != end) {
                    val neighbors = edges(currentVertex)
                    if(neighbors != null && neighbors.count() > 0) {
                        for(edge in neighbors) {
                            if(!visited.contains(edge.destination)) {
                                visited.add(edge.destination)
                                stack.push(edge.destination)
                                currentVertex = stack.peek()
                                continue@loop
                            }
                        }
                    } else {
                        stack.pop()
                        currentVertex = stack.peek()
                        continue
                    }

                    stack.pop()
                    currentVertex = stack.peek()
                }

                return stack
            }

            fun breadthFirstSearch() {

            }

            fun floydWarshallAlgorythm(): Pair<Array<DoubleArray>, Array<IntArray>> {
                val nVertices = this.adjacencyMap.size

                val weights = Array(nVertices) { Array(nVertices-1) { 0.0 } }
                this.adjacencyMap
                        .asSequence()
                        .map { it.value }
                        .withIndex()
                        .forEach { (index, weightsOfVertex) ->
                            weightsOfVertex.asSequence()
                                    .withIndex()
                                    .forEach { (weightIndex, weight) ->
                                        weights[index][weightIndex] = weight.weight!!
                                    }
                        }

                val dist = Array(nVertices) { DoubleArray(nVertices) { Double.POSITIVE_INFINITY } }
                for (w in weights) dist[(w[0] - 1).toInt()][(w[1] - 1).toInt()] = w[2]
                val next = Array(nVertices) { IntArray(nVertices) }
                for (i in 0 until next.size) {
                    for (j in 0 until next.size) {
                        if (i != j) next[i][j] = j + 1
                    }
                }
                for (k in 0 until nVertices) {
                    for (i in 0 until nVertices) {
                        for (j in 0 until nVertices) {
                            if (dist[i][k] + dist[k][j] < dist[i][j]) {
                                dist[i][j] = dist[i][k] + dist[k][j]
                                next[i][j] = next[i][k]
                            }
                        }
                    }
                }
                return dist to next
            }
        }

        fun <T: Comparable<T>> TreeMap<T, Array<Double>>.toAdjacencyList(type: EdgeType): AdjacencyList<T> {
            val list = AdjacencyList<T>()

            this.keys.forEach { list.createVertex(it) }
            this.entries
                    .asSequence()
                    .withIndex()
                    .forEach { (x, edge) ->
                        val vertex = list.createVertex(edge.key)
                        edge.value
                                .asSequence()
                                .withIndex()
                                .forEach { (y, weight) ->
                                    if(weight != .0 && y != x)
                                        list.add(type, vertex, list.createVertex(this.keys.elementAt(y)), weight)
                                }
                    }
            return list
        }
        //End KT Extensions

        abstract fun solve(scanner: Scanner, printer: PrintWriter)
    }

    class FastScanner: Scanner {
        var inputStream: InputStream? = null
        override fun changeInputStream(inputStream: InputStream) {
            this.inputStream = inputStream
            this.bufferedReader = BufferedReader(InputStreamReader(inputStream))
        }

        private lateinit var bufferedReader: BufferedReader
        private var stringTokenizer: StringTokenizer? = null

        private fun nextToken(): String? {
            while (stringTokenizer == null || !stringTokenizer!!.hasMoreTokens())
                stringTokenizer = StringTokenizer(bufferedReader.readLine() ?: return null)
            return stringTokenizer!!.nextToken()
        }

        override fun nextInt() = nextToken()!!.toInt()
        override fun nextLong() = nextToken()!!.toLong()
        override fun nextDouble() = nextToken()!!.toDouble()
        override fun nextChar() = bufferedReader.read().toChar()
        override fun nextString() = nextToken()!!
        override fun nextLine() = bufferedReader.readLine()!!
        override fun nextBigInteger() = BigInteger(nextToken()!!)
        override fun nextBigDecimal() = BigDecimal(nextToken()!!)
    }

    class TaskBuilder {
        private var task: Task? = null
        private var inputStream: InputStream? = null
        private var outputStream: OutputStream? = null
        private var scanner: Scanner? = null

        fun useInputSource(inputStream: InputStream): TaskBuilder {
            this.inputStream = inputStream
            return this
        }

        fun useOutputSource(outputStream: OutputStream): TaskBuilder {
            this.outputStream = outputStream
            return this
        }

        fun useInputFile(inputFileName: String): TaskBuilder {
            this.inputStream = FileInputStream(File(inputFileName))
            return this
        }

        fun useOutputFile(outputFileName: String): TaskBuilder {
            this.outputStream = FileOutputStream(File(outputFileName))
            return this
        }

        fun useScanner(scanner: Scanner): TaskBuilder {
            this.scanner = scanner
            return this
        }

        fun solveTask(task: Task): TaskBuilder {
            this.task = task
            return this
        }

        fun run() {
            when {
                task == null -> throw NullPointerException("Task cannot be null!")
                inputStream == null -> throw NullPointerException("Input cannot be null!")
                outputStream == null -> throw NullPointerException("Output cannot be null!")
                scanner == null -> throw NullPointerException("Scanner cannot be null!")
            }
            scanner!!.changeInputStream(inputStream!!)
            val printer = PrintWriter(outputStream)
            TaskRunnable(task!!, scanner!!, printer).run()

            inputStream!!.close()
            printer.close()
        }

        class TaskRunnable(
                private val task: Task,
                private val scanner: Scanner,
                private val printer: PrintWriter
        ) {
            fun run() {
                task.solve(scanner, printer)
            }
        }
    }

    @JvmStatic
    fun main(args: Array<String>) = TaskBuilder()
            .useInputSource(System.`in`)
            .useOutputSource(System.out)
            .useScanner(FastScanner())
            .solveTask(TaskA())
            .run()

    class TaskA: Task() {
        override fun solve(scanner: Scanner, printer: PrintWriter) {
            val (firstValency, secondValency, thirdValency) = scanner.nextLine()
                    .split(" ")
                    .map { it.toLong() }
            val averageValency = (firstValency + secondValency + thirdValency) / 2
            val countOfConnectionsFirst = averageValency - thirdValency
            val countOfConnectionsSecond = averageValency - firstValency
            val countOfConnectionsThird = averageValency - secondValency

            when {
                (firstValency + secondValency + thirdValency) / 2 % 1 != 0L -> { printer.println("Impossible"); return }
                countOfConnectionsFirst < 0 -> { printer.println("Impossible"); return }
                countOfConnectionsSecond < 0 -> { printer.println("Impossible"); return }
                countOfConnectionsThird < 0 -> { printer.println("Impossible"); return }
                else -> printer.println("$countOfConnectionsFirst $countOfConnectionsSecond $countOfConnectionsThird")
            }
        }

    }
}


import java.util.*

fun main(args: Array<String>) {
	val s = Scanner(System.`in`)
	val a = s.nextInt()
	val b = s.nextInt()
	val c = s.nextInt() * 2
	if (a >= c && b >= c) {
		println("First")
	} else {
		println("Second")
	}
}


import java.io.*

val stdout = System.out;
val stdin = FastScanner(System.`in`);

fun solve() {
    val n = nextInt()
    val arr = nextIntArray(n)
    when {
        arr.last() == 15 -> print("DOWN")
        arr.last() == 0 -> print("UP")
        arr.size < 2 -> print("-1")
        else -> if (arr[n - 1] > arr[n - 2]) print("UP") else print("DOWN")
    }
}

inline fun print(message: Any?) = stdout.print(message)
inline fun print(message: Int) = stdout.print(message)
inline fun print(message: Long) = stdout.print(message)
inline fun print(message: Byte) = stdout.print(message)
inline fun print(message: Short) = stdout.print(message)
inline fun print(message: Char) = stdout.print(message)
inline fun print(message: Boolean) = stdout.print(message)
inline fun print(message: Float) = stdout.print(message)
inline fun print(message: Double) = stdout.print(message)
inline fun print(message: CharArray) = stdout.print(message)
inline fun println(message: Any?) = stdout.println(message)
inline fun println(message: Int) = stdout.println(message)
inline fun println(message: Long) = stdout.println(message)
inline fun println(message: Byte) = stdout.println(message)
inline fun println(message: Short) = stdout.println(message)
inline fun println(message: Char) = stdout.println(message)
inline fun println(message: Boolean) = stdout.println(message)
inline fun println(message: Float) = stdout.println(message)
inline fun println(message: Double) = stdout.println(message)
inline fun println(message: CharArray) = stdout.println(message)
inline fun println() = stdout.println()

inline fun nextInt() = stdin.nextInt()
inline fun nextLong() = stdin.nextLong()
inline fun nextChar() = stdin.nextChar()
inline fun next() = stdin.next()
inline fun nextLine() = stdin.nextLine()
inline fun nextIntArray(n: Int) = IntArray(n, { nextInt() })

class FastScanner(ins: InputStream): Closeable {
    val BUFFER_SIZE = 65536;
    val br: BufferedReader
    var end = false

    var len: Int = 0
    val buffer = CharArray(BUFFER_SIZE)
    var it: Int = 0

    init {
        br = BufferedReader(InputStreamReader(ins), BUFFER_SIZE)
    }

    constructor(file: String): this(FileInputStream(file))

    inline fun isLineBreaker(c: Char) = c == '\n'
    inline fun isDelimiter(c: Char) = c == ' ' || c == '\n' || c == '\r'

    inline fun ensureBuffer() {
        if (it == len) {
            it = 0
            len = br.read(buffer)
            if (len == -1) end = true
        }
    }

    inline fun moveNext() {
        while (!end) {
            ensureBuffer()
            if (!isDelimiter(buffer[it])) return
            while (it < len && isDelimiter(buffer[it])) it++;
        }
    }

    inline fun nextChar(): Char {
        moveNext()
        if (end) return (-1).toChar()
        return buffer[it++]
    }

    inline fun next(): String {
        moveNext()
        val sb = StringBuilder()
        while (!end) {
            val l = it
            while (++it < len && !isDelimiter(buffer[it]));
            sb.append(buffer, l, it - l)
            ensureBuffer()
            if (end || isDelimiter(buffer[it])) break;
        }
        return sb.toString()
    }

    inline fun nextInt(): Int {
        moveNext()
        var minus = true
        if (buffer[it] == '-') {
            it++
            minus = false
        }
        var result: Int = 0
        while (!end) {
            while (it < len && !isDelimiter(buffer[it])) {
                result *= 10
                result += (buffer[it] - '0').toInt()
                it++
            }
            ensureBuffer()
            if (end || isDelimiter(buffer[it])) break
        }
        return if (minus) result else -result
    }

    inline fun nextLong(): Long {
        moveNext()
        var minus = true
        if (buffer[it] == '-') {
            it++
            minus = false
        }
        var result: Long = 0
        while (!end) {
            while (it < len && !isDelimiter(buffer[it])) {
                result *= 10
                result += (buffer[it] - '0').toLong()
                it++
            }
            ensureBuffer()
            if (end || isDelimiter(buffer[it])) break
        }
        return if (minus) result else -result
    }

    inline fun nextLine(): String {
        moveNext()
        val sb = StringBuilder()
        while (!end) {
            val l = it
            while (++it < len && !isLineBreaker(buffer[it]));
            sb.append(buffer, l, it - l)
            ensureBuffer()
            if (end || isLineBreaker(buffer[it])) break;
        }
        return sb.toString()
    }

    override fun close() {
        br.close()
    }
}

fun main(args: Array<String>) {
    solve()
    stdin.close()
    stdout.close();
}


import java.io.*
import java.util.*

class ProblemIO(val rd: BufferedReader, val wr: PrintWriter) {
    companion object {
        fun console() = ProblemIO(BufferedReader(InputStreamReader(System.`in`)), PrintWriter(System.out))
        fun files(inputFilename: String, outputFilename: String) =
                ProblemIO(BufferedReader(FileReader(File(inputFilename))), PrintWriter(File(outputFilename)))
    }

    var tok = StringTokenizer("")

    fun close() { rd.close(); wr.close() }
    fun <T> print(v: T) = wr.print(v)
    fun <T> println(v: T) = wr.println(v)
    fun readToken(): String {
        while (!tok.hasMoreTokens()) tok = StringTokenizer(rd.readLine())
        return tok.nextToken()
    }
    fun readLine(): String {
        tok = StringTokenizer("")
        return rd.readLine()
    }
    fun readInt(): Int = readToken().toInt()
    fun readLong(): Long = readToken().toLong()
}

fun main(args: Array<String>) {
    Thread({ val io = ProblemIO.console(); solve(io); io.close() }).start()
}

fun solve(io: ProblemIO) {
    val n = io.readInt()
    val a = IntArray(n, { io.readInt() })
    val l = a.last()
    val res = when {
        l == 15 -> "DOWN"
        l == 0 -> "UP"
        else -> when {
            a.size == 1 -> "-1"
            l > a[a.lastIndex - 1] -> "UP"
            l < a[a.lastIndex - 1] -> "DOWN"
            else -> "-1"
        }
    }
    io.println(res)
}


fun main() {
    val r = System.`in`.bufferedReader()
    val s = StringBuilder()
    val n = r.readLine()!!.toInt()
    val v = r.readLine()!!.split(" ").map { it.toInt() }
    if (n == 1) {
        when {
            v[0] == 0 -> println("UP")
            v[0] == 15 -> println("DOWN")
            else -> println(-1)
        }
    } else {
        val before = v[n - 2]
        val mid = v[n - 1]
        when {
            mid == 15 -> println("DOWN")
            mid == 0 -> println("UP")
            mid > before -> println("UP")
            mid < before -> println("DOWN")
        }
    }
}


fun main() {
    fun readInts() = readLine()!!.split(" ").map(String::toInt)

    readLine()
    val sizes = readInts()
    print(
        when {
            sizes.last() == 0 -> "UP"
            sizes.last() == 15 -> "DOWN"
            sizes.size == 1 -> "-1"
            sizes.last() > sizes[sizes.lastIndex - 1] -> "UP"
            else -> "DOWN"
        }
    )
}


import java.io.*

fun main() = bufferOut { readSolveWrite() }

private const val MOD = 1000_000_007

private val dp = IntArray(2001 * 2001 * 2) { -1 }

fun compute(b: Int, r: Int, u: Int): Int {
    if (b < 0 || b > r || r == 0) return 0
    val index = (b * 2001 + r) * 2 + u
    dp[index].let { if (it >= 0) return it }
    var res = (compute(b + 1, r - 1, 0) + compute(b - 1, r - 1, 0)) % MOD
    if (u == 0) {
        if (b < r)
            res =  modMax(res, (1 + compute(b + 1, r - 1, 1) + compute(b - 1, r - 1, 0)) % MOD)
        if (b > 0)
            res = modMax(res, (1 + compute(b + 1, r - 1, 0) + compute(b - 1, r - 1, 1)) % MOD)
    }
    dp[index] = res
    return res
}

fun modMax(a: Int, b: Int): Int =
    if ((a - b + MOD) % MOD < MOD / 2) a else b

private fun PrintWriter.readSolveWrite() {
    val n = readLine()!!.toInt()
    println(compute(0, 2 * n, 0))
}

private fun bufferOut(block: PrintWriter.() -> Unit) = PrintWriter(System.out).use { block(it) }


import java.io.*
import java.util.*

fun main(args: Array<String>) {
    solve(System.`in`, System.out)
}

val MAX_N = (1e6 + 10).toInt()
val INF = (1e9 + 7).toInt()
val MOD = (1e9 + 7).toInt()
val INF_F = 1e-6

fun solve(input: InputStream, output: OutputStream) {
    val reader = InputReader(BufferedInputStream(input))
    val writer = PrintWriter(BufferedOutputStream(output))

    solve(reader, writer)
    writer.close()
}

fun solve(reader: InputReader, writer: PrintWriter) {
    val s = reader.next()
    for (i in 1 until s.length - 1) {
        if (s[i - 1] == '.' || s[i] == '.' || s[i + 1] == '.') {
            continue
        }

        if (s[i - 1] != s[i] && s[i - 1] != s[i + 1] && s[i] != s[i + 1]) {
            writer.println("yes")
            return
        }
    }
    writer.println("no")
}

fun gcd(a: Int, b: Int): Int {
    return if (b == 0) a else gcd(b, a % b)
}

class InputReader(stream: InputStream) {
    private val reader = BufferedReader(InputStreamReader(stream), 32768)
    private var tokenizer: StringTokenizer? = null

    operator fun next(): String {
        while (tokenizer == null || !tokenizer!!.hasMoreTokens()) {
            try {
                tokenizer = StringTokenizer(reader.readLine())
            } catch (e: IOException) {
                throw RuntimeException(e)
            }

        }
        return tokenizer!!.nextToken()
    }

    fun nextInt(): Int {
        return Integer.parseInt(next())
    }

    fun nextLong(): Long {
        return java.lang.Long.parseLong(next())
    }

    fun nextArrayInt(count: Int): IntArray {
        return nextArrayInt(0, count)
    }

    fun nextArrayInt(start: Int, count: Int): IntArray {
        val a = IntArray(start + count)
        for (i in start until start + count) {
            a[i] = nextInt()
        }
        return a
    }

    fun nextArrayLong(count: Int): LongArray {
        val a = LongArray(count)
        for (i in 0 until count) {
            a[i] = nextLong()
        }
        return a
    }
}


fun main(args: Array<String>){
    val opa = readLine()!!
    var result = false
    for (i in 1..opa.length - 2){
    if (opa.get(i) != opa.get(i-1)
    && opa.get(i) != opa.get(i+1)
    && opa.get(i) != '.'
    && opa.get(i+1) != '.'
    && opa.get(i-1) != '.'
    && opa.get(i-1) != opa.get(i+1)){
        result = true
    }
    }
    if (result){
    println("Yes")
    } else {
    println("No")
    }

}


fun main(args: Array<String>){
    val opa = readLine()
    if (opa == null){
    System.out.println("No")
    return
    } else {
    var result = false
    for (i in 1..opa.length - 2){
    if (opa.get(i) != opa.get(i-1)
    && opa.get(i) != opa.get(i+1)
    && opa.get(i) != '.'
    && opa.get(i+1) != '.'
    && opa.get(i-1) != '.'){
        result = true
    }
    }
    if (result){
    println("Yes")
    } else {
    println("No")
    }
    }

}


import kotlin.math.max

fun main() {
    val (numExams, requiredSum) = readLine()!!.split(" ").map(String::toInt)
    if (requiredSum <= 2* numExams) return print(numExams)
    print(max(0, 3 * numExams - requiredSum))
}


fun main() {
    val (numExams, requiredSum) = readLine()!!.split(" ").map(String::toInt)
    if (requiredSum <= 2* numExams) return print(numExams)
    print(3 * numExams - requiredSum)
}


fun main(args: Array<String>) {
    val a = readLine()!!.split(" ").map{ it.toInt() }.toMutableList()
    if (a[0] * 3 >= a[1]) {
        print(0)
    } else {
        print(a[0] * 3 - a[1])
    }
}


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.lang.AssertionError
import java.util.*
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min

val MOD = 1_000_000_007
fun powMod(a: Long, n: Long, mod: Int): Long {
  if (n == 0L) return 1
  val res = powMod(a * a % mod, n / 2, mod)
  return if (n % 2 == 1L) res * a % mod else res
}
class Solver(stream: InputStream, private val out: java.io.PrintWriter) {
  private val reader = BufferedReader(InputStreamReader(stream), 32768)

  fun solve() {
    val S = ns()
    val Ss = (0 until 10).map { S.replace('X', '0'+it) }.distinct()
    val ans = Ss.map(::solve2).sum()
    out.println(ans)
  }

  fun solve2(S: String): Int {
    debug{"solve2($S)"}
    val N = S.length
    if (N < 3) {
      return solve_naive(S)
    }

    val head = S.take(max(0, N - 2)) // 0かもしれない
    val fst = head.take(1)
    val snd = head.drop(1)
    val tail = S.drop(head.length)

    fun countTail(): Int {
      var cnt = 0
      for (num in 0 until 100) {
        if (num % 25 == 0 && accepts(tail, num) != null) cnt++
      }
      return cnt
    }

    fun countHead(): Int {
      if (fst.isEmpty()) return 1

      val c1 = when(fst[0]) {
        '_' -> 9
        '0' -> 0
        else -> 1
      }
      val underscores = snd.count { it == '_' }
      val c2 = powMod(10, underscores.toLong(), MOD).toInt()
      return c1 * c2
    }

    debug{"countTail: ${countTail()} countHead${countHead()}"}
    return countTail() * countHead()
  }

  fun solve_naive(S: String): Int {
    val N = S.length
    val max = powMod(10, N.toLong(), MOD).toInt()
    var cnt = 0
    for (num in 0 until max) {
      if (num % 25 != 0) continue
      val res = accepts(S, num) ?: continue
      if (res.length == 1 || res[0] != '0') cnt++
    }
    return cnt
  }

  fun accepts(S: String, num: Int): String? {
    val numStr = ("00$num").takeLast(S.length)
    val ok = numStr.indices.all { S[it] == '_' || S[it] == numStr[it] }
    return if (ok) numStr else null
  }

  private val isDebug = try {
    // なんか本番でエラーでる
    System.getenv("MY_DEBUG") != null
  } catch (t: Throwable) {
    false
  }

  private var tokenizer: StringTokenizer? = null
  private fun next(): String {
    while (tokenizer == null || !tokenizer!!.hasMoreTokens()) {
      tokenizer = StringTokenizer(reader.readLine())
    }
    return tokenizer!!.nextToken()
  }

  private fun ni() = next().toInt()
  private fun nl() = next().toLong()
  private fun ns() = next()
  private fun na(n: Int, offset: Int = 0): IntArray {
    return IntArray(n) { ni() + offset }
  }
  private fun nal(n: Int, offset: Int = 0): LongArray {
    val res = LongArray(n)
    for (i in 0 until n) {
      res[i] = nl() + offset
    }
    return res
  }

  private fun na2(n: Int, offset: Int = 0): Array<IntArray> {
    val a  = Array(2){IntArray(n)}
    for (i in 0 until n) {
      for (e in a) {
        e[i] = ni() + offset
      }
    }
    return a
  }

  private inline fun debug(msg: () -> String) {
    if (isDebug) System.err.println(msg())
  }

  /**
   * コーナーケースでエラー出たりするので、debug(dp[1])のように添え字付きの場合はdebug{}をつかうこと
   */
  private inline fun debug(a: LongArray) {
    debug { a.joinToString(" ") }
  }

  private inline fun debug(a: IntArray) {
    debug { a.joinToString(" ") }
  }

  private inline fun debug(a: BooleanArray) {
    debug { toString(a) }
  }

  private inline fun toString(a: BooleanArray) = run{a.map { if (it) 1 else 0 }.joinToString("")}

  private inline fun debugDim(A: Array<LongArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }
  private inline fun debugDim(A: Array<IntArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }
  private inline fun debugDim(A: Array<BooleanArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }

  /**
   * 勝手にimport消されるのを防ぎたい
   */
  private fun hoge() {
    min(1, 2)
    max(1, 2)
    abs(-10)
  }

  private inline fun assert(b: Boolean) = run{if (!b) throw AssertionError()}
  private inline fun assert(b: Boolean, f: () -> String) = run{if (!b) throw AssertionError(f())}

  companion object {
    // TestRunnerから呼びたいので単純なmainじゃだめ
    fun main() {
      val out = java.io.PrintWriter(System.out)
      Solver(System.`in`, out).solve()
      out.flush()
    }
  }
}

/**
 * judgeから呼ばれる
 */
fun main() = Solver.main()


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.lang.AssertionError
import java.util.*
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min

val MOD = 1_000_000_007
fun powMod(a: Long, n: Long, mod: Int): Long {
  if (n == 0L) return 1
  val res = powMod(a * a % mod, n / 2, mod)
  return if (n % 2 == 1L) res * a % mod else res
}
class Solver(stream: InputStream, private val out: java.io.PrintWriter) {
  private val reader = BufferedReader(InputStreamReader(stream), 32768)

  fun solve() {
    val S = ns()
    val Ss = (0 until 10).map { S.replace('X', '0'+it) }.distinct()
    val ans = Ss.map(::solve2).sum()
    out.println(ans)
  }

  fun solve2(S: String): Int {
    debug{"solve2($S)"}
    val N = S.length
    if (N == 1) {
      return when(S[0]) {
        '0', '_' -> 1
        else -> 0
      }
    }

    val head = S.take(max(0, N - 2)) // 0かもしれない
    val fst = head.take(1)
    val snd = head.drop(1)
    val tail = S.drop(head.length)

    fun countTail(): Int {
      var cnt = 0
      for (num in 0 until 100) {
        if (num % 25 != 0) continue
        val numStr = ("0$num").takeLast(2)
        val ok = numStr.indices.all { tail[it] == '_' || tail[it] == numStr[it] }
        if (ok) cnt++
      }
      return cnt
    }

    fun countHead(): Int {
      if (fst.isEmpty()) return 1

      val c1 = when(fst[0]) {
        '_' -> 9
        '0' -> 0
        else -> 1
      }
      val underscores = snd.count { it == '_' }
      val c2 = powMod(10, underscores.toLong(), MOD).toInt()
      return c1 * c2
    }

    debug{"countTail: ${countTail()} countHead${countHead()}"}
    return countTail() * countHead()
  }

  private val isDebug = try {
    // なんか本番でエラーでる
    System.getenv("MY_DEBUG") != null
  } catch (t: Throwable) {
    false
  }

  private var tokenizer: StringTokenizer? = null
  private fun next(): String {
    while (tokenizer == null || !tokenizer!!.hasMoreTokens()) {
      tokenizer = StringTokenizer(reader.readLine())
    }
    return tokenizer!!.nextToken()
  }

  private fun ni() = next().toInt()
  private fun nl() = next().toLong()
  private fun ns() = next()
  private fun na(n: Int, offset: Int = 0): IntArray {
    return IntArray(n) { ni() + offset }
  }
  private fun nal(n: Int, offset: Int = 0): LongArray {
    val res = LongArray(n)
    for (i in 0 until n) {
      res[i] = nl() + offset
    }
    return res
  }

  private fun na2(n: Int, offset: Int = 0): Array<IntArray> {
    val a  = Array(2){IntArray(n)}
    for (i in 0 until n) {
      for (e in a) {
        e[i] = ni() + offset
      }
    }
    return a
  }

  private inline fun debug(msg: () -> String) {
    if (isDebug) System.err.println(msg())
  }

  /**
   * コーナーケースでエラー出たりするので、debug(dp[1])のように添え字付きの場合はdebug{}をつかうこと
   */
  private inline fun debug(a: LongArray) {
    debug { a.joinToString(" ") }
  }

  private inline fun debug(a: IntArray) {
    debug { a.joinToString(" ") }
  }

  private inline fun debug(a: BooleanArray) {
    debug { toString(a) }
  }

  private inline fun toString(a: BooleanArray) = run{a.map { if (it) 1 else 0 }.joinToString("")}

  private inline fun debugDim(A: Array<LongArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }
  private inline fun debugDim(A: Array<IntArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }
  private inline fun debugDim(A: Array<BooleanArray>) {
    if (isDebug) {
      for (a in A) {
        debug(a)
      }
    }
  }

  /**
   * 勝手にimport消されるのを防ぎたい
   */
  private fun hoge() {
    min(1, 2)
    max(1, 2)
    abs(-10)
  }

  private inline fun assert(b: Boolean) = run{if (!b) throw AssertionError()}
  private inline fun assert(b: Boolean, f: () -> String) = run{if (!b) throw AssertionError(f())}

  companion object {
    // TestRunnerから呼びたいので単純なmainじゃだめ
    fun main() {
      val out = java.io.PrintWriter(System.out)
      Solver(System.`in`, out).solve()
      out.flush()
    }
  }
}

/**
 * judgeから呼ばれる
 */
fun main() = Solver.main()


import java.io.*
import java.util.*

val reader = BufferedReader(InputStreamReader(System.`in`))
val writer = PrintWriter(System.out)

val maxn = 50

fun solve() {
    var (a, b, m) = reader.readLine()!!.split(" ").map { it.toLong() }
    for (q in maxn downTo 1) {
        var coefficients = LongArray(q) { 1L }
        var r = LongArray(q) { 1L }
        r[0] = a
        for (i in 0 until q - 1) {
            coefficients[i] = (1L shl (q - i - 2))
        }
        var cur = 0L
        for (i in 0 until q) {
            cur += coefficients[i] * r[i]
            if (coefficients[i] * r[i] < 0) {
                cur = -1
                break
            }
        }
        if (cur < 0 || cur > b) {
            continue
        }
        for (i in 1 until q) {
            var rem = b - cur
            var addingValue = rem / coefficients[i]
            addingValue = Math.min(addingValue, m - 1   )
            r[i] += addingValue
            cur += addingValue * coefficients[i]
        }
        if (cur == b) {
            writer.print("$q ")
            var sum = 0L
            for (i in 0 until q) {
                var previousSum = sum
                sum += r[i]
                writer.print("$sum ")
                sum += previousSum
            }
            writer.print("\n")
            return
        } else {
            continue
        }
    }
    writer.print("-1\n")
}

fun main() {
    val q = reader.readLine()!!.toInt()
    for (i in 1..q) {
        solve()
    }
    writer.close()
}


import java.io.*

val reader = BufferedReader(InputStreamReader(System.`in`))
val writer = PrintWriter(System.out)

const val maxN = 55

fun solve() {
    var (a, b, m) = reader.readLine()!!.split(" ").map { it.toLong() }
    for (q in maxN downTo 1) {
        var coefficients = LongArray(q) { 1L }
        var r = LongArray(q) { 1L }
        r[0] = a
        for (i in 0 until q - 1) {
            coefficients[i] = (1L shl (q - i - 2))
        }
        var cur = 0L
        for (i in 0 until q) {
            cur += coefficients[i] * r[i]
            if (coefficients[i] * r[i] < 0) {
                cur = -1
                break
            }
        }
        if (cur < 0 || cur > b) {
            continue
        }
        for (i in 1 until q) {
            var rem = b - cur
            var addingValue = rem / coefficients[i]
            addingValue = Math.min(addingValue, m - 1   )
            r[i] += addingValue
            cur += addingValue * coefficients[i]
        }
        if (cur == b) {
            writer.print("$q ")
            var sum = 0L
            for (i in 0 until q) {
                var previousSum = sum
                sum += r[i]
                writer.print("$sum ")
                sum += previousSum
            }
            writer.print("\n")
            return
        } else {
            continue
        }
    }
    writer.print("-1\n")
}

fun main() {
    val q = reader.readLine()!!.toInt()
    for (i in 1..q) {
        solve()
    }
    writer.close()
}


import java.lang.Long.max
import java.lang.Long.min
import kotlin.math.max

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toLong() } // list of ints

fun main() {
    val q = readInt()

    repeat(q) {
        val (a, b, m) = readInts()
        fun f(x: Int) = 1L shl x

        var cur = a
        var sm = a
        var t = 0
        while (sm + 1 <= b) {
            cur = sm + 1
            sm += cur
            t++
        }

        val ans = mutableListOf(a)
        sm = a
        for (i in 1..t) {
            var temp = sm + 1
            val ff = f(max(0, t - i-1))
            val c = min((b - cur)/ ff, m-1)

            cur += c*ff
            temp += c
            ans.add(temp)
            sm += temp
        }
        if (cur != b)
            print("-1\n")
        else {
            print("" + ans.size + " " + ans.joinToString(" ") + "\n")
        }
    }
}


import java.lang.Long.max
import java.lang.Long.min

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toLong() } // list of ints

fun main() {
    val q = readInt()

    repeat(q) {
        val (a, b, m) = readInts()
        fun f(x: Int) = 1L shl x

        var cur = a
        var sm = a
        var t = 0
        while (sm + 1 < b) {
            cur = sm + 1
            sm += cur
            t++
        }

        val ans = mutableListOf(a)
        sm = a
        for (i in 1 until t) {
            var temp = sm + 1
            val ff = f(t - i)
            val c = min((b - cur)/ ff, m-1)

            cur += c*ff
            temp += c
            ans.add(temp)
            sm += temp
        }
        if (b - cur > m-1)
            print("-1\n")
        else {
            ans.add(b)
            print("" + ans.size + " " + ans.joinToString(" ") + "\n")
        }
    }
}


import java.lang.Long.max
import java.lang.Long.min
import kotlin.math.max

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toLong() } // list of ints

fun main() {
    val q = readInt()

    repeat(q) {
        val (a, b, m) = readInts()
        fun f(x: Int) = 1L shl x

        var cur = a
        var sm = a
        var t = 0
        while (sm + 1 <= b) {
            cur = sm + 1
            sm += cur
            t++
        }

        val ans = mutableListOf(a)
        sm = a
        for (i in 1..t) {
            var temp = sm + 1
            val ff = f(max(0, t - i-1))
            val c = min((b - cur)/ ff, m-1)

            cur += c*ff
            temp += c
            ans.add(temp)
            sm += temp
        }
        if (b - cur > m-1)
            print("-1\n")
        else {
            print("" + ans.size + " " + ans.joinToString(" ") + "\n")
        }
    }
}