use std::io::{self, stdin};

fn main() -> io::Result<()> {
    let mut buffer = String::new();
    let input = stdin();
    input.read_line(&mut buffer)?;
    let mut money: u32 = buffer.trim().parse().expect("Not int");
    let mut bills = 0;
    let denoms = [100, 20, 10, 5, 1];
    for denom in &denoms {
        bills += money / denom;
        money %= denom;
    }
    println!("{}", bills);
    Ok(())
}


use std::io;

fn main() {
    let mut guess = String::new();

    io::stdin()
        .read_line(&mut guess)
        .expect("Failed to read line");

    let mut bills:u32 = 0;
    let mut n= guess.trim().parse::<u32>().unwrap();

    while n > 0 {
        if (n % 100) == 0 {
            n = n - 100;
            bills+=1;
        }
        else if (n % 20) == 0
        {
            n = n - 20;
            bills+=1;
        }
        else if (n % 10) == 0
        {
            n = n - 10;
            bills+=1;
        }
        else if (n % 5) == 0
        {
            n = n - 5;
            bills+=1;
        }
        else
        {
            n = n - 1;
            bills+=1;
        }
    }
    print!("{}",bills);
}


use std::io::stdin;

fn main() {
    let mut buffer = String::new();
    let _ = stdin().read_line(&mut buffer);

    let mut total = buffer.trim().parse::<u32>().expect("Error in parsing");

    let mut count = 0;
    while total > 0 {
        if total % 100 == 0 {
            total -= 100;
            count += 1;
        } else if total % 20 == 0 {
            total -= 20;
            count += 1;
        } else if total % 10 == 0 {
            total -= 10;
            count += 1;
        } else if total % 5 == 0 {
            total -= 5;
            count += 1;
        } else if total % 1 == 0 {
            total -= 1;
            count += 1;
        }
    }

    println!("{}", count);
}


fn main() {
  let mut buffer = String::new();
  std::io::stdin().read_line(&mut buffer).expect("Failed");

  let mut num = buffer.trim().parse::<i64>().unwrap();
  let mut bills = 0;

  while num > 0 {
    if num >= 100 {
      num -= 100;
      bills += 1;
    }
    else if num >= 20 {
      num -= 20;
      bills += 1;
    }
    else if num >= 10 {
      num -= 10;
      bills += 1;
    }
    else if num >= 5 {
      num -= 5;
      bills += 1;
    }
    else if num >= 1 {
      num -= 1;
      bills += 1;
    }
  }

  println!("{}", bills);
}


use std::io;

fn main()
{
    let mut cases = String::new();

    io::stdin()
        .read_line(&mut cases)
        .expect("no input");

    let mut cases : u32 = cases.trim().parse().expect("nan");

    let a = [100, 20, 10, 5, 1];
    let mut i = 0;
    let mut count = 0;
    while cases > 0 {
        if cases >= a[i]
        {
            count+= 1;
            cases -= a[i];
        }
        else
        {
            i += 1;
        }
    }
    println!("{}", count);

}


use std::io;

fn main() -> io::Result<()> {
    let mut input = String::new();

    io::stdin().read_line(&mut input)?;

    let mut n = input.trim().parse::<usize>().unwrap();

    let mut k = 0;

    while n >= 100 {
        n -= 100;
        k += 1;
    }
    while n >= 20 {
        n -= 20;
        k += 1;
    }
    while n >= 10 {
        n -= 10;
        k += 1;
    }
    while n >= 5 {
        n -= 5;
        k += 1;
    }
    while n >= 1 {
        n -= 1;
        k += 1;
    }

    println!("{}", k);

    Ok(())
}


//spnauti-rust
#[allow(unused_macros)]
macro_rules! a {
    ($c: tt, $x: expr, $y: expr) => {{
        let b = $y; let a = &mut $x;
        if b $c *a { *a = b; true } else { false }
    }};
}
use std::io::*;
use std::str::*;
use std::fmt::Debug;
struct WordReader<'a> { it : SplitAsciiWhitespace<'a>, }
#[allow(dead_code)]
impl<'a> WordReader<'a> {
    fn new<T: Read>(b: &mut String, mut r: T) -> WordReader {
        b.clear();
        r.read_to_string(b).unwrap();
        WordReader { it: b.split_ascii_whitespace() }
    }
    fn from_stdin(b: &mut String) -> WordReader {
        WordReader::new(b, stdin())
    }
    fn sl(&mut self) ->  &str { self.it.next().unwrap() }
    fn bs(&mut self) -> &[u8] { self.sl().as_bytes()    }
    fn s(&mut self) -> String { String::from(self.sl()) }
    fn i(&mut self) ->    i32 { self.p()                }
    fn p<T: FromStr>(&mut self) -> T where T::Err: Debug {
        self.sl().parse::<T>().unwrap()
    }
    fn vp<T: FromStr>(&mut self, n: usize) -> Vec<T> where T::Err: Debug {
        (0..n).map(|_| self.p()).collect()
    }
}

fn main() {
    let mut bin = String::new();
    let mut input = WordReader::from_stdin(&mut bin);

    let n = input.i();
    let sol = [1,5,10,20,100].into_iter().rev()
        .fold((n,0), |(x,a),y| (x % y, a + x / y)).1;
    println!("{}", sol);
}


use std::io::{self, Write};

fn min_bills(mut n: usize) -> usize {
    let bills = [100, 20, 10, 5, 1];
    let mut nbills = 0;

    for i in &bills {
        nbills += n / i;
        n %= i;
    }

    nbills
}

fn main() {
    let (stdin, stdout) = (io::stdin(), io::stdout());
    let mut scan = Scanner::new(stdin.lock());
    let mut out = io::BufWriter::new(stdout.lock());

    let n: usize = scan.next().trim().parse().unwrap();

    writeln!(out, "{}", min_bills(n)).ok();
}

pub struct Scanner<T> {
    reader: T,
}

impl<R: io::BufRead> Scanner<R> {
    pub fn new(reader: R) -> Self {
        Self { reader }
    }

    pub fn next(&mut self) -> String {
        let mut input = String::new();
        self.reader.read_line(&mut input).unwrap();

        return input;
    }
}


use std::io;
use std::str;
use std::io::{Write, StdinLock, StdoutLock, BufWriter};

/// Reads white-space separated tokens one at a time.
pub struct Scanner<R> {
    reader: R,
    buffer: Vec<String>,
}

impl<R: io::BufRead> Scanner<R> {
    pub fn new(reader: R) -> Self {
        Self {
            reader,
            buffer: vec![],
        }
    }

    /// Use "turbofish" syntax token::<T>() to select data type of next token.
    ///
    /// # Panics
    ///
    /// Panics if there's an I/O error or if the token cannot be parsed as T.
    pub fn token<T: str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buffer.pop() {
                return token.parse().ok().expect("Failed parse");
            }
            let mut input = String::new();
            self.reader.read_line(&mut input).expect("Failed read");
            self.buffer = input.split_whitespace().rev().map(String::from).collect();
        }
    }
}

/// Same API as Scanner but nearly twice as fast, using horribly unsafe dark arts
/// **REQUIRES** Rust 1.34 or higher
pub struct UnsafeScanner<R> {
    reader: R,
    buf_str: Vec<u8>,
    buf_iter: str::SplitAsciiWhitespace<'static>,
}

impl<R: io::BufRead> UnsafeScanner<R> {
    pub fn new(reader: R) -> Self {
        Self {
            reader,
            buf_str: vec![],
            buf_iter: "".split_ascii_whitespace(),
        }
    }

    /// This function should be marked unsafe, but noone has time for that in a
    /// programming contest. Use at your own risk!
    pub fn token<T: str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buf_iter.next() {
                return token.parse().ok().expect("Failed parse");
            }
            self.buf_str.clear();
            self.reader
                .read_until(b'\n', &mut self.buf_str)
                .expect("Failed read");
            self.buf_iter = unsafe {
                let slice = str::from_utf8_unchecked(&self.buf_str);
                std::mem::transmute(slice.split_ascii_whitespace())
            }
        }
    }
}

pub fn scanner_from_file(filename: &str) -> Scanner<io::BufReader<std::fs::File>> {
    let file = std::fs::File::open(filename).expect("Input file not found");
    Scanner::new(io::BufReader::new(file))
}

pub fn writer_to_file(filename: &str) -> io::BufWriter<std::fs::File> {
    let file = std::fs::File::create(filename).expect("Output file not found");
    io::BufWriter::new(file)
}

fn solve() { // scan: &mut Scanner<StdinLock>, out: &mut BufWriter<StdoutLock>
    let (stdin, stdout) = (io::stdin(), io::stdout());
    let mut scan = Scanner::new(stdin.lock());
    let mut out = io::BufWriter::new(stdout.lock());
    let n = scan.token::<i32>();
    let k = scan.token::<i32>();
    let mut arr = scan.token::<String>().chars().collect::<Vec<char>>();

    for i in 0..k {
        let mut finish = true;
        let mut pos = 0;
        while pos < arr.len() - 1 {
            if arr[pos] == 'B' && arr[pos+1] == 'G' {
                arr.swap(pos, pos+1);
                finish = false;
                pos += 2;
            } else {
                pos += 1;
            }
        }

        if finish {
            break;
        }
    }

    out.write(arr.iter().collect::<String>().as_bytes());
}

fn main() {
    std::thread::Builder::new()
    .stack_size(64 * 1024 * 1024)
    .spawn(solve)
    .unwrap()
    .join()
    .unwrap();
}


use std::char;
use std::fmt;
use std::fmt::Debug;
use std::fmt::Formatter;
use std::io;
use std::io::Stdin;
use std::str::FromStr;

fn read_line(stdin : &Stdin, line : &mut String) {
    match stdin.read_line(line) {
        Ok(_) => return,
        Err(msg) => panic!("Could not read line! Message: {}.", msg),
    }
}

fn parse_t<T : FromStr>(s : &str) -> T {
    match s.trim().parse() {
        Ok(y) => y,
        Err(_) => panic!("Could not read from string!"),
    }
}

fn read_ts<T : FromStr>(stdin : &Stdin, ts : &mut Vec<T>) {
    let mut line = String::new();
    read_line(stdin, &mut line);
    let word_iter = line.split_whitespace();
    for word in word_iter {
        let x = parse_t(word);
        ts.push(x);
    }
}

enum BoyOrGirl {
    Boy,
    Girl,
}

impl BoyOrGirl {
    fn new(c : char) -> BoyOrGirl {
        match c {
            'B' => BoyOrGirl::Boy,
            'G' => BoyOrGirl::Girl,
            x => panic!("Cannot convert {} to a BoyOrGirl!", x),
        }
    }
}

impl Debug for BoyOrGirl {
    fn fmt(&self, f : &mut Formatter) -> fmt::Result {
        match *self {
            BoyOrGirl::Boy => write!(f, "B"),
            BoyOrGirl::Girl => write!(f, "G"),
        }
    }
}

fn step(curr : &Vec<BoyOrGirl>, next : &mut Vec<BoyOrGirl>) {
    let l = curr.len();
    let mut i = 0;
    while i <  l {
        match curr[i] {
            BoyOrGirl::Boy => {
                if (i + 1) < l {
                    match curr[i + 1] {
                        BoyOrGirl::Girl => {
                            next.push(BoyOrGirl::Girl);
                            next.push(BoyOrGirl::Boy);
                            i = i + 2;
                        },
                        BoyOrGirl::Boy => {
                            next.push(BoyOrGirl::Boy);
                            i = i + 1;
                        },
                    }
                } else {
                    next.push(BoyOrGirl::Boy);
                    i = i + 1;
                }
            },
            BoyOrGirl::Girl => {
                next.push(BoyOrGirl::Girl);
                i = i + 1;
            }
        }
    }
}

fn print_queue(q : &Vec<BoyOrGirl>) {
    for bg in q {
        print!("{:?}", bg);
    }
    println!();
}

fn main() {
    let stdin = io::stdin();
    let mut n_t : Vec<u64> = vec![];
    read_ts(&stdin, &mut n_t);
    let t = n_t[1];
    let mut s = String::new();
    read_line(&stdin, &mut s);
    let mut queue : Vec<BoyOrGirl> = s.trim().chars().map(|c| BoyOrGirl::new(c)).collect();
    for _ in 0 .. t {
        let mut next = vec![];
        step(&queue, &mut next);
        queue = next;
    }
    print_queue(&queue);
}


use std::io::{self};

fn main() {
    let mut a_line = String::new();
    io::stdin().read_line(&mut a_line).unwrap();
    let mut it = a_line.trim().split_whitespace();
    let n = it.next().unwrap().parse::<usize>().unwrap();
    let t = it.next().unwrap().parse::<i32>().unwrap();

    let mut line_text = String::new();
    io::stdin().read_line(&mut line_text).unwrap();

    let mut line: Vec<char> = line_text.trim().chars().collect();

    for _ in 0..t {
        let mut j = 0;
        while j < n - 1 {
            if (line[j] == 'B') && (line[j + 1] == 'G') {
                line[j] = 'G';
                line[j + 1] = 'B';
                j = j + 1;
            }
            j = j + 1;
        }
    }
    println!("{}", line.into_iter().collect::<String>());
}


use std::io;

fn read_line() -> String {
    let mut line = String::new();
    io::stdin().read_line(&mut line).unwrap();
    line
}

fn main() {

    let line = read_line();
    let mut ns = line.split_whitespace().map(|s| s.parse::<usize>().unwrap());
    let n = ns.next().unwrap();
    let t = ns.next().unwrap();

    let mut buf = read_line().into_bytes();
    for _ in 0..t {
        for i in (0..(n-1)).filter(|i| buf[*i] == 'B' as u8 && buf[*i+1] == 'G' as u8).collect::<Vec<usize>>() {
            buf[i] = 'G' as u8;
            buf[i+1] = 'B' as u8;
        }
    }

    print!("{}", String::from_utf8(buf).unwrap());
}


use std::io::*;

fn read<T: std::str::FromStr>(i: &mut StdinLock) -> T {
    let mut s = String::new();
    i.by_ref().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn reads<T: std::str::FromStr>(i: &mut StdinLock) -> Vec<T> {
    let mut s = String::new();
    i.by_ref().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

fn main() {
    // initialize stdin
    let sin = std::io::stdin();
    let mut sin = sin.lock();
    let sin = &mut sin;

    let states: Vec<i32> = reads(sin);
    let mut rail: String = read(sin);

    let _n = states[0];
    let gen = states[1];

    for _ in 0..gen {
        rail = rail.replace("BG", "GB");
    }

    println!("{}", rail);
}


#[allow(dead_code)]
use std::io::{self, prelude::*};

//use itertools::Itertools;
//let mut iter = "αβγ".chars().dropping(2);
//itertools::assert_equal(iter, "γ".chars());

fn solve<B: BufRead, W: Write>(mut scan: Scanner<B>, mut w: W) {
    let n = scan.token::<usize>();
    let t = scan.token::<usize>();
    let mut ans : Vec<char> = Vec::with_capacity(n);

    let line = scan.token::<String>();
    for c in line.chars() {
        ans.push(c);
    }

    for _ in 1..=t {
        let mut i: usize = 0;
        while i < n-1 {
            if ans[i] == 'B' && ans[i+1] == 'G' {
                ans.swap(i, i+1);
                i += 2;
                continue;
            }
            i += 1;
        }
    }
    let ans: String = ans.into_iter().collect();

    writeln!(w, "{}", ans);
}

fn main() {
    let stdin = io::stdin();
    let stdout = io::stdout();
    let reader = Scanner::new(stdin.lock());
    let writer = io::BufWriter::new(stdout.lock());
    solve(reader, writer);
}

pub struct Scanner<B> {
    reader: B,
    buf_str: Vec<u8>,
    buf_iter: std::str::SplitWhitespace<'static>,
}
impl<B: BufRead> Scanner<B> {
    pub fn new(reader: B) -> Self {
        Self {
            reader,
            buf_str: Vec::new(),
            buf_iter: "".split_whitespace()
        }
    }
    pub fn token<T: std::str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buf_iter.next() {
                return token.parse().ok().expect("Failed parse");
            }
            self.buf_str.clear();
            self.reader.read_until(b'\n', &mut self.buf_str).expect("Failed read");
            self.buf_iter = unsafe {
                let slice = std::str::from_utf8_unchecked(&self.buf_str);
                std::mem::transmute(slice.split_whitespace()) }
        }
    }
}


// https://codeforces.com/problemset/problem/266/B

use std::io;

fn main() {
    let mut line = String::new();

    io::stdin()
        .read_line(&mut line)
        .unwrap();

    let words: Vec<i64> =
        line
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect();

    let n = words[0];
    let t = words[1];

    let mut s = String::new();

    io::stdin()
        .read_line(&mut s)
        .unwrap();

    let mut s: Vec<char> =
        s.chars().collect();

    let mut time = 0;

    while time < t {
        let mut idx: usize = 0;
        loop {
            if idx as i64 >= n+1 {
                break;
            }
            if s[idx] == 'B' && s[idx+1] == 'G' {
                s[idx] = 'G';
                s[idx+1] = 'B';
                idx += 2;
            } else {
                idx += 1;
            }
        }
        time += 1;
    }

    let answer: String = s.into_iter().collect();
    print!("{}", answer);
}


#![allow(non_snake_case, unused_imports, deprecated, dead_code)]

// Input macros
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($next, $t); input_inner!{$next $($r)*} }; }
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, [ $t:tt ]) => { { let len = read_value!($next, usize); (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() } }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, bytes) => { read_value!($next, String).into_bytes() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

// Module
use std::cmp::{min,max};
use std::collections::{VecDeque,HashMap,HashSet,BTreeMap,BTreeSet,BinaryHeap};
// Module for v1.15.1
use std::ascii::AsciiExt; // deprecated since 1.26.0: use inherent method instead

// Functions

// Main
fn main() {

    input! {
        N: usize,
        T: usize,
        mut S: chars
    }

    for _ in 0..T {
        let mut ci = vec![];
        for i in 0..N-1 {
            if S[i]=='B' && S[i+1]=='G' {
                ci.push(i);
            }
        }
        for i in ci {
            S[i]   = 'G';
            S[i+1] = 'B';
        }
    }

    println!("{}", S.iter().collect::<String>());
}


use std::io;

macro_rules! readln {
    () => {{
        use std::io;
        let mut buf = String::new();
        io::stdin().read_line(&mut buf).unwrap();
        buf.trim().to_string()
    }};
    ( $t:ty ) => {{
        let input = readln!();
        input.parse::<$t>().unwrap()
    }};
    ( $( $t:ty ),+ ) => {{
        let input = readln!();
        let mut input = input.split_whitespace();
        (
            $(
                input.next().unwrap().parse::<$t>().unwrap(),
            )+
        )
    }}
}

fn main() {
    let message = readln!();
    let message = message.chars().collect::<Vec<_>>();

    if message.len() % 2 == 0 {
        for index in 0..message.len() / 2 {
            print!("{}{}", message[message.len() / 2 - 1 - index], message[message.len() / 2 + index]);
        }
    } else {
        print!("{}", message[message.len() / 2]);
        for index in 0..message.len() / 2 {
            print!("{}{}", message[message.len() / 2 + 1 + index], message[message.len() / 2 - 1 - index]);
        }
    }

    println!();
}


fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let s = s.trim();
    let mut i: usize = 0;
    let mut j: usize = s.len()-1;

    let mut r = String::new();
    let mut last = s.len() % 2 == 0;

    for _ in 0..s.len() {
        if last {
            let c = s.chars().nth(j).unwrap();
            r.push(c);
            j -= 1;
        } else {
            let c = s.chars().nth(i).unwrap();
            r.push(c);
            i += 1;
        }
        last = !last;
    }
    println!("{}", r.chars().rev().collect::<String>());
}


#[allow(unused_imports)]
use std::cmp::{min,max};
#[allow(unused_imports)]
use std::collections::{BTreeMap,BTreeSet};
#[allow(unused_imports)]
use std::ops::*;
#[allow(unused_imports)]
use std::collections::BinaryHeap;

#[allow(unused_macros)]
macro_rules! ite {
    ($c:expr, $t:expr, $f:expr) => {{
        if $c { $t } else { $f }
    }};
}

// ref: tanakh <https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8>
// diff: using Parser
#[macro_export]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut parser = Parser::from_str($s);
        input_inner!{parser, $($r)*}
    };
    (parser = $parser:ident, $($r:tt)*) => {
        input_inner!{$parser, $($r)*}
    };
    (new_stdin_parser = $parser:ident, $($r:tt)*) => {
        let stdin = std::io::stdin();
        let reader = std::io::BufReader::new(stdin.lock());
        let mut $parser = Parser::new(reader);
        input_inner!{$parser, $($r)*}
    };
    ($($r:tt)*) => {
        input!{new_stdin_parser = parser, $($r)*}
    };
}

#[macro_export]
macro_rules! input_inner {
    ($parser:ident) => {};
    ($parser:ident, ) => {};
    ($parser:ident, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($parser, $t);
        input_inner!{$parser $($r)*}
    };
}

#[macro_export]
macro_rules! read_value {
    ($parser:ident, ( $($t:tt),* )) => {
        ( $(read_value!($parser, $t)),* )
    };
    ($parser:ident, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($parser, $t)).collect::<Vec<_>>()
    };
    ($parser:ident, chars) => {
        read_value!($parser, String).chars().collect::<Vec<char>>()
    };
    ($parser:ident, usize1) => {
        read_value!($parser, usize) - 1
    };
    ($parser:ident, $t:ty) => {
        $parser.next::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        s: chars,
    }
    if s.len() % 2 == 0 {
        let n = s.len();
        let m = s.len() / 2;
        let mut res = String::new();
        for i in (0..m).rev() {
            res.push(s[i]);
            res.push(s[n-i-1]);
        }
        println!("{}", res);
    }
    else {
        let n = s.len();
        let m = s.len() / 2;
        let mut res = String::new();
        res.push(s[m]);
        for i in (0..m).rev() {
            res.push(s[n-i-1]);
            res.push(s[i]);
        }
        println!("{}", res);
    }
}

use std::io::BufRead;
use std::io;
use std::str;

// ref: tatsuya6502 <https://qiita.com/tatsuya6502/items/cd448486f7ef7b5b8c7e>
// ref: wariuni <https://qiita.com/tatsuya6502/items/cd448486f7ef7b5b8c7e#comment-7040a5ae96305e884eb9>
// diff: using std::io::BufRead::fill_buf()
pub struct Parser<R> {
    reader: R,
    buf: Vec<u8>,
    pos: usize,
}

impl Parser<io::Empty> {
    pub fn from_str(s: &str) -> Parser<io::Empty> {
        Parser {
            reader: io::empty(),
            buf: s.as_bytes().to_vec(),
            pos: 0,
        }
    }
}

impl<R:BufRead> Parser<R> {
    pub fn new(reader: R) -> Parser<R> {
        Parser {
            reader: reader,
            buf: vec![],
            pos: 0,
        }
    }
    pub fn update_buf(&mut self) {
        self.buf.clear();
        self.pos = 0;
        loop {
            let (len,complete) = {
                let buf2 = self.reader.fill_buf().unwrap();
                self.buf.extend_from_slice(buf2);
                let len = buf2.len();
                (len, buf2[len-1] <= 0x20)
            };
            self.reader.consume(len);
            if complete {
                break;
            }
        }
    }
    pub fn next<T:str::FromStr>(&mut self) -> Result<T, T::Err> {
        loop {
            let mut begin = self.pos;
            while begin < self.buf.len() && (self.buf[begin] <= 0x20) {
                begin += 1;
            }
            let mut end = begin;
            while end < self.buf.len() && (self.buf[end] > 0x20) {
                end += 1;
            }
            if begin != self.buf.len() {
                self.pos = end;
                return str::from_utf8(&self.buf[begin..end]).unwrap().parse::<T>();
            }
            else {
                self.update_buf();
            }
        }
    }
}

pub fn continuous_division<T:PartialEq+Eq+Clone+Copy>(xs: &[T]) -> Vec<(T,usize)> {
    let mut res = vec![];
    let n = xs.len();
    for i in 0..n {
        if i == 0 || xs[i-1] != xs[i] {
            res.push((xs[i], 1));
        }
        else {
            let m = res.len();
            res[m-1].1 += 1;
        }
    }
    res
}

use std::fmt::Display;
#[allow(dead_code)]
fn write_vec<T: Display>(xs: &Vec<T>) {
    if xs.len() == 0 {
        println!();
        return;
    }
    print!("{}", xs[0]);
    for i in 1..xs.len() {
        print!(" {}", xs[i]);
    }
    println!();
}


#![allow(unused_imports, unused_variables, dead_code, non_snake_case, unused_macros)]
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;
use std::fmt::*;
use std::str::*;
use std::cmp::*;
use std::collections::*;
fn getline() -> String {
    let mut res = String::new();
    std::io::stdin().read_line(&mut res).ok();
    res
}
macro_rules ! readl { ( $ t : ty ) => { { let s = getline ( ) ; s . trim ( ) . parse ::<$ t > ( ) . unwrap ( ) } } ; ( $ ( $ t : ty ) ,+ ) => { { let s = getline ( ) ; let mut iter = s . trim ( ) . split ( ' ' ) ; ( $ ( iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) , ) * ) } } ; }
macro_rules ! readlvec { ( $ t : ty ) => { { let s = getline ( ) ; let iter = s . trim ( ) . split ( ' ' ) ; iter . map ( | x | x . parse ( ) . unwrap ( ) ) . collect ::< Vec <$ t >> ( ) } } }
macro_rules ! mvec { ( $ v : expr , $ s : expr ) => { vec ! [ $ v ; $ s ] } ; ( $ v : expr , $ s : expr , $ ( $ t : expr ) ,* ) => { vec ! [ mvec ! ( $ v , $ ( $ t ) ,* ) ; $ s ] } ; }
macro_rules ! debug { ( $ x : expr ) => { println ! ( "{}: {:?}" , stringify ! ( $ x ) , $ x ) } }
fn printiter<'a, T>(v: &'a T)
where
    &'a T: std::iter::IntoIterator,
    <&'a T as std::iter::IntoIterator>::Item: std::fmt::Display,
{
    for (i, e) in v.into_iter().enumerate() {
        if i != 0 {
            print!(" ");
        }
        print!("{}", e);
    }
    println!("");
}
struct ContestPrinter {
    s: String,
}
impl ContestPrinter {
    fn new() -> ContestPrinter {
        ContestPrinter { s: String::new() }
    }
    fn print<T>(&mut self, x: T)
    where
        T: std::fmt::Display,
    {
        self.s.push_str(format!("{}", x).as_str());
    }
    fn println<T>(&mut self, x: T)
    where
        T: std::fmt::Display,
    {
        self.s.push_str(format!("{}\n", x).as_str());
    }
}
impl std::ops::Drop for ContestPrinter {
    fn drop(&mut self) {
        print!("{}", self.s);
    }
}
static MOD: i64 = 1e9 as i64 + 7;
fn is_max_i64(num: i64) -> bool {
    if num == i64::max_value() {
        true
    } else {
        false
    }
}
fn main() {
    let mut pr = ContestPrinter::new();
    let N = readl!(usize);
    let s = readl!(String);
    let sc = s.chars().collect::<Vec<char>>();
    let mut idx = 1;
    let mut ans = 1;
    if N == 1 {
        pr.println(1);
        return;
    }
    while idx < N {
        if ((sc[idx - 1] == 'R') & (sc[idx] == 'U')) |
           ((sc[idx - 1] == 'U') & (sc[idx] == 'R')) {
            idx += 1;
        }
        idx += 1;
        if idx <= N  { ans += 1; }
    }
    pr.println(ans);
}


use std::io;

fn main() {

    let mut n: String = String::new();
    let mut seq: String = String::new();

    io::stdin().read_line(&mut n);
    io::stdin().read_line(&mut seq);

    let n: i32 = n.trim().parse::<i32>().unwrap();
    let seq = seq.trim().chars().collect::<Vec<_>>();

    let mut ans: i32 = n;
    let mut last: char = 'D';
    for c in seq {
        if c != last && last != 'D' {
            ans = ans - 1;
            last = 'D';
        } else {
            last = c;
        }
    }

    println!("{}", ans);
}


// ---------- begin ModInt ----------
const MOD: u32 = 1_000_000_007;

#[derive(Clone, Copy)]
struct ModInt(u32);

impl std::ops::Add for ModInt {
    type Output = ModInt;
    fn add(self, rhs: ModInt) -> Self::Output {
        let mut d = self.0 + rhs.0;
        if d >= MOD {
            d -= MOD;
        }
        ModInt(d)
    }
}

impl std::ops::AddAssign for ModInt {
    fn add_assign(&mut self, rhs: ModInt) {
        *self = *self + rhs;
    }
}

impl std::ops::Sub for ModInt {
    type Output = ModInt;
    fn sub(self, rhs: ModInt) -> Self::Output {
        let mut d = self.0 + MOD - rhs.0;
        if d >= MOD {
            d -= MOD;
        }
        ModInt(d)
    }
}

impl std::ops::SubAssign for ModInt {
    fn sub_assign(&mut self, rhs: ModInt) {
        *self = *self - rhs;
    }
}

impl std::ops::Mul for ModInt {
    type Output = ModInt;
    fn mul(self, rhs: ModInt) -> Self::Output {
        ModInt((self.0 as u64 * rhs.0 as u64 % MOD as u64) as u32)
    }
}

impl std::ops::MulAssign for ModInt {
    fn mul_assign(&mut self, rhs: ModInt) {
        *self = *self * rhs;
    }
}

impl std::ops::Neg for ModInt {
    type Output = ModInt;
    fn neg(self) -> Self::Output {
        ModInt(if self.0 == 0 {0} else {MOD - self.0})
    }
}

impl std::fmt::Display for ModInt {
    fn fmt<'a>(&self, f: &mut std::fmt::Formatter<'a>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}

impl std::str::FromStr for ModInt {
    type Err = std::num::ParseIntError;
    fn from_str(s: &str) -> Result<Self, Self::Err> {
        let val = s.parse::<u32>()?;
        Ok(ModInt::new(val))
    }
}

#[allow(dead_code)]
impl ModInt {
    pub fn new(n: u32) -> ModInt {
        ModInt(n % MOD)
    }
    pub fn zero() -> ModInt {
        ModInt(0)
    }
    pub fn one() -> ModInt {
        ModInt(1)
    }
    pub fn pow(self, mut n: u32) -> ModInt {
        let mut t = ModInt::one();
        let mut s = self;
        while n > 0 {
            if n & 1 == 1 {
                t *= s;
            }
            s *= s;
            n >>= 1;
        }
        t
    }
    pub fn inv(self) -> ModInt {
        self.pow(MOD - 2)
    }
}
// ---------- end ModInt ----------
// ---------- begin Precalc ----------
#[allow(dead_code)]
struct Precalc {
    inv: Vec<ModInt>,
    fact: Vec<ModInt>,
    ifact: Vec<ModInt>,
}

#[allow(dead_code)]
impl Precalc {
    pub fn new(n: usize) -> Precalc {
        let mut inv = vec![ModInt::one(); n + 1];
        let mut fact = vec![ModInt::one(); n + 1];
        let mut ifact = vec![ModInt::one(); n + 1];
        for i in 2..(n + 1) {
            inv[i] = -inv[MOD as usize % i] * ModInt(MOD / i as u32);
            fact[i] = fact[i - 1] * ModInt(i as u32);
            ifact[i] = ifact[i - 1] * inv[i];
        }
        Precalc {
            inv: inv,
            fact: fact,
            ifact: ifact,
        }
    }
    pub fn inv(&self, n: usize) -> ModInt {
        self.inv[n]
    }
    pub fn fact(&self, n: usize) -> ModInt {
        self.fact[n]
    }
    pub fn ifact(&self, n: usize) -> ModInt {
        self.ifact[n]
    }
    pub fn comb(&self, n: usize, k: usize) -> ModInt {
        if k > n {
            return ModInt::zero();
        }
        self.fact[n] * self.ifact[k] * self.ifact[n - k]
    }
}
// ---------- end Precalc ----------
use std::io::Read;

fn run() {
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();
    let mut it = s.trim().split_whitespace();
    let n: usize = it.next().unwrap().parse().unwrap();
    let w: usize = it.next().unwrap().parse().unwrap();
    let mut a = vec![vec![]; 3];
    for _ in 0..n {
        let t: usize = it.next().unwrap().parse().unwrap();
        let g: usize = it.next().unwrap().parse().unwrap();
        a[g - 1].push(t);
    }
    let mut way = vec![vec![vec![vec![ModInt::zero(); a[2].len() + 2]; a[1].len() + 2]; a[0].len() + 2]; 3];
    way[0][1][0][0] = ModInt::one();
    way[1][0][1][0] = ModInt::one();
    way[2][0][0][1] = ModInt::one();
    for i in 0..=a[0].len() {
        for j in 0..=a[1].len() {
            for k in 0..=a[2].len() {
                for l in 0..3 {
                    let v = way[l][i][j][k];
                    for (g, &(x, y, z)) in [(i + 1, j, k), (i, j + 1, k), (i, j, k + 1)].iter().enumerate() {
                        if g != l {
                            way[g][x][y][z] += v;
                        }
                    }
                }
            }
        }
    }
    let mut dp1 = vec![vec![vec![ModInt::zero(); w + 1]; a[1].len() + 1]; a[0].len() + 1];
    dp1[0][0][0] = ModInt::one();
    for &b in a[0].iter() {
        for i in (1..=a[0].len()).rev() {
            for t in (b..=w).rev() {
                let v = dp1[i - 1][0][t - b];
                dp1[i][0][t] += v;
            }
        }
    }
    for &b in a[1].iter() {
        for i in 0..=a[0].len() {
            for j in (1..=a[1].len()).rev() {
                for t in (b..=w).rev() {
                    let v = dp1[i][j - 1][t - b];
                    dp1[i][j][t] += v;
                }
            }
        }
    }
    let mut dp2 = vec![vec![ModInt::zero(); w + 1]; a[2].len() + 1];
    dp2[0][0] = ModInt::one();
    for &b in a[2].iter() {
        for i in (1..=a[2].len()).rev() {
            for t in (b..=w).rev() {
                let v = dp2[i - 1][t - b];
                dp2[i][t] += v;
            }
        }
    }
    let pc = Precalc::new(n);
    let mut ans = ModInt::zero();
    for i in 0..=a[0].len() {
        for j in 0..=a[1].len() {
            for k in 0..=a[2].len() {
                for t in 0..=w {
                    let way = way[0][i][j][k] + way[1][i][j][k] + way[2][i][j][k];
                    ans += dp1[i][j][t] * dp2[k][w - t] * way * pc.fact(i) * pc.fact(j) * pc.fact(k);
                }
            }
        }
    }
    println!("{}", ans);
}

fn main() {
    run();
}


//spnauti-rust
use std::io::*;
use std::str::*;
use std::fmt::Debug;
#[allow(unused_imports)] use std::cmp::Ordering::{self,*};
#[allow(unused_imports)] use std::ops::*;
#[allow(unused_imports)] use std::collections::*;

#[allow(unused_macros)]
macro_rules! a {
    ($c: tt, $x: expr, $y: expr) => {{
        let b = $y; let a = &mut $x;
        if b $c *a { *a = b; true } else { false }
    }};
}
struct WordReader<'a> { it : SplitAsciiWhitespace<'a>, }
#[allow(dead_code)]
impl<'a> WordReader<'a> {
    fn new<T: Read>(b: &mut String, mut r: T) -> WordReader {
        b.clear();
        r.read_to_string(b).ok();
        WordReader { it: b.split_ascii_whitespace() }
    }
    fn from_stdin(b: &mut String) -> WordReader {
        WordReader::new(b, stdin())
    }
    fn sl(&mut self) ->  &str { self.it.next().unwrap() }
    fn bs(&mut self) -> &[u8] { self.sl().as_bytes()    }
    fn s(&mut self) -> String { String::from(self.sl()) }
    fn i(&mut self) ->    i32 { self.p()                }
    fn u(&mut self) ->  usize { self.p()                }
    fn vi(&mut self, n: usize) -> Vec<i32> {
        self.vp::<i32>(n)
    }
    fn p<T: FromStr>(&mut self) -> T where T::Err: Debug {
        self.sl().parse::<T>().unwrap()
    }
    fn vp<T: FromStr>(&mut self, n: usize) -> Vec<T> where T::Err: Debug {
        (0..n).map(|_| self.p()).collect()
    }
}

#[allow(dead_code)]
fn build_counting_hashmap<K: Eq + std::hash::Hash, T>(i: T) -> HashMap<K,usize>
    where T: Iterator<Item = K> {
    let mut m = HashMap::new();
    for k in i {
        let n = 1 + if let Some(&n) = m.get(&k) { n } else { 0 };
        m.insert(k, n);
    }
    m
}

const P5: i32 = 1_000_000_007;
const P6: i64 = P5 as i64;
#[derive(Debug,Clone,Copy)]
struct Field(i32);
#[allow(dead_code)]
impl Field {
    fn new<T: Into<i64>>(a: T) -> Self { Self(Self::cv(a)) }
    fn new_unchecked(a: i32) -> Self { Self(a) }
    fn hi(mut a: i32) -> i32 { if a >= P5 { a -= P5; } a }
    fn lo(mut a: i32) -> i32 { if a < 0 { a += P5; } a }
    fn cv<T: Into<i64>>(a: T) -> i32 { Self::lo((a.into() % P6) as i32) }
}
impl Add for Field { type Output = Self; fn add(self, a: Self) -> Self::Output { Self(Self::hi(self.0 + a.0)) }}
impl Sub for Field { type Output = Self; fn sub(self, a: Self) -> Self::Output { Self(Self::lo(self.0 - a.0)) }}
impl Mul for Field { type Output = Self; fn mul(self, a: Self) -> Self::Output { Self(Self::cv(self.0 as i64 * a.0 as i64)) }}
impl Neg for Field { type Output = Self; fn neg(self) -> Self::Output { Self(Self::lo(-self.0)) }}
impl AddAssign for Field { fn add_assign(&mut self, a: Self) { *self = *self + a; } }
impl SubAssign for Field { fn sub_assign(&mut self, a: Self) { *self = *self - a; } }
impl MulAssign for Field { fn mul_assign(&mut self, a: Self) { *self = *self * a; } }
use std::fmt::{Display, Formatter, Result};
impl Display for Field { fn fmt(&self, f: &mut Formatter) -> Result { write!(f, "{}", self.0) } }
// impl Default for Field { fn default() -> Self { Field(0) }}
impl Default for &Field { fn default() -> Self { &Field(0) }}
impl PartialEq for Field { fn eq(&self, a: &Self) -> bool { self.0 == a.0 } }
impl PartialOrd for Field { fn partial_cmp(&self, a: &Self) -> Option<Ordering> { Some(self.0.cmp(&a.0)) } }
impl Eq for Field {}
impl Ord for Field { fn cmp(&self, a: &Self) -> Ordering { self.0.cmp(&a.0) } }

fn main() {
    let mut bin = String::new();
    let mut input = WordReader::from_stdin(&mut bin);

    let n = input.u();
    let tt = input.i();
    let mut t = vec![0; n];
    let mut g = vec![0; n];
    let mut z = vec![0; 4];
    for i in 0..n {
        t[i] = input.i();
        g[i] = input.i();
        z[g[i] as usize] += 1;
    }
    let sumt: i32 = t.iter().sum();

    let dp2 = {
        let mut dp2 = HashMap::<(i32,i32,i32),Field>::new();
        let mut dp = HashMap::<(i32,i32,i32,i32,i32),Field>::new();
        for g in 1..4 {
            dp.insert((0,0,0,0,g), Field(1));
        }
        for _i in 0..n {
            let mut d = HashMap::<(i32,i32,i32,i32,i32),Field>::new();
            for ((h,a,b,c,l), y) in dp.into_iter() {
                let mut p = [0,a,b,c];
                let mut pf = [Field(0),Field(a),Field(b),Field(c)];
                for g in 1..4 {
                    let gu = g as usize;
                    if (h == 0 && g != l) || (h > 0 && g == l) {
                        continue;
                    }
                    p[gu] += 1;
                    pf[gu] += Field(1);
                    if (1..4).all(|i| p[i] <= z[i]) {
                        let key = (h + 1, p[1], p[2], p[3], g);
                        let res = y * pf[g as usize] + *d.get(&key).unwrap_or_default();
                        d.insert(key, res);
                    }
                    p[gu] -= 1;
                    pf[gu] -= Field(1);
                }
            }

            for (&(_,a,b,c,_),&x) in d.iter() {
                let key = (a,b,c);
                let res = *dp2.get(&key).unwrap_or_default();
                dp2.insert(key, res + x);
            }
            dp = d;
            // println!("\n-----------------------: {}", _i);
            // for ((h,a,b,c,g),x) in dp.iter() {
            // println!("{} {} {} {} {}: {}", h,a,b,c,g,x);
            // }
        }
        dp2
    };
    // eprintln!("DP2");
    // for ((a,b,c),x) in dp2.iter() {
        // println!("dp2    {} {} {} : {}", a,b,c,x);
    // }

    let dp1 = {
        let mut st = [0; 3];
        st[2] = 1;
        st[1] = st[2] * (z[2] + 1);
        st[0] = st[1] * (z[1] + 1);
        let st = st;
        let sz = (st[0] * (sumt + 1)) as usize;

        let mut aa = vec![Field(0); sz];
        let mut dp = HashSet::<i32>::new();
        dp.insert(0);
        aa[0] = Field(1);
        for i in 0..n {
            if g[i] == 3 { continue; }

            let mut d = HashSet::<i32>::new();
            let mut a = vec![Field(0); sz];
            let x = t[i];
            let g = g[i] as usize;
            for &s in dp.iter() {
                let key = s + (x * st[0]) + st[g];
                d.insert(key);
                a[key as usize] += aa[s as usize];
            }
            for key in d.into_iter() {
                let s = key as usize;
                aa[s] += a[s];
                dp.insert(key);
            }
        }
        let mut dp1 = HashMap::<(i32,i32,i32),Field>::new();
        for s in dp.into_iter() {
            let t = s / st[0];
            let a = s % st[0] / st[1];
            let b = s % st[1] / st[2];
            dp1.insert((t,a,b),aa[s as usize]);
        }
        dp1
    };
    // eprintln!("DP1");
    // for ((a,b,c),x) in dp1.iter() {
        // println!("dp1    {} {} {} : {}", a,b,c,x);
    // }

    let dp3 = {
        let mut st = [0; 4];
        st[3] = 1;
        st[0] = st[3] * (z[3] + 1);
        let st = st;
        let sz = (st[0] * (sumt + 1)) as usize;

        let mut aa = vec![Field(0); sz];
        let mut dp = HashSet::<i32>::new();
        dp.insert(0);
        aa[0] = Field(1);
        for i in 0..n {
            if g[i] != 3 { continue; }

            let mut d = HashSet::<i32>::new();
            let mut a = vec![Field(0); sz];
            let x = t[i];
            let g = g[i] as usize;
            for &s in dp.iter() {
                let key = s + (x * st[0]) + st[g];
                d.insert(key);
                a[key as usize] += aa[s as usize];
            }
            for key in d.into_iter() {
                let s = key as usize;
                aa[s] += a[s];
                dp.insert(key);
            }
        }
        let mut dp3 = HashMap::<(i32,i32),Field>::new();
        for s in dp.into_iter() {
            let t = s / st[0];
            let c = s % st[0] / st[3];
            dp3.insert((t,c),aa[s as usize]);
        }
        dp3
    };
    // eprintln!("DP3");
    // for ((a,b),x) in dp3.iter() {
        // println!("dp3    {} {} : {}", a,b,x);
    // }

    let dp1 = {
        let mut dp = HashMap::<(i32,i32,i32),Field>::new();
        for ((tab,a,b),res1) in dp1 {
            let tc = tt - tab;
            if tc < 0 { continue; }
            for c in 0..=z[3] {
                if let Some(&res2) = dp3.get(&(tc,c)) {
                    let res3 = *dp.get(&(a,b,c)).unwrap_or_default();
                    dp.insert((a,b,c), res3 + res1*res2);
                }
            }
        }
        dp
    };
    // println!("DP1");
    // println!("DP1");
    // for ((a,b,c),&x) in dp1.iter() {
        // println!("dpX    {} {} {} : {}", a,b,c,x);
    // }

    let mut sol = Field::new_unchecked(0);
    for a in 0..=z[1] as i32 {
        for b in 0..=z[2] as i32 {
            for c in 0..=z[3] as i32 {
                let x = *dp1.get(&(a,b,c)).unwrap_or_default();
                let y = *dp2.get(&(a,b,c)).unwrap_or_default();
                sol += x * y;
            }
        }
    }
    println!("{}", sol);
}


#![allow(warnings)]

use std::io::{self, *};
use std::str::{self, *};

fn main() {
    let mut stdin = stdin();
    let mut buffer = String::new();
    let _ = stdin.read_to_string(&mut buffer);
    let mut input = buffer.split_whitespace().map(|w| w.parse::<i32>().unwrap());
    let n = input.next().unwrap();
    let l = input.next().unwrap();
    let r = input.next().unwrap();

    let mini = (0..l).map(|i| 2_i32.pow(i as u32)).sum::<i32>() + (n - l);
    let maxi = (0..r).map(|i| 2_i32.pow(i as u32)).sum::<i32>() + (n - r) * 2_i32.pow((r-1) as u32);

    println!("{} {}", mini, maxi);
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

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

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

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

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

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

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*);
    }
}

#[allow(unused_imports)]
use std::cmp::{min, max};
#[allow(unused_imports)]
use std::io::{stdout, stdin, BufWriter, Write};

fn main() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }

    input!{
      n: usize,
      l: usize,
      r: usize,
    }

    let mut min_ans = 0;
    let mut d = 1;
    for _ in 0..l {
        min_ans += d;
        d *= 2;
    }
    min_ans += (n-l) * 1;

    let mut max_ans = 0;
    let mut d = 1;
    for _ in 0..r {
        max_ans += d;
        d *= 2;
    }

    max_ans += (n-r) * (d/2);
    puts!("{} {}\n", min_ans, max_ans);
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

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

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

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

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

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

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{BinaryHeap, HashMap};

#[allow(dead_code)]
type Graph = Vec<Vec<usize>>;

fn main() {
    input! {
        n: usize, l: usize, r: usize,
    }

    let mini = (1 << l) - 1 + 1 * (n - l);
    let maxi = (1 << r) - 1 + (1 << (r - 1)) * (n - r);

    println!("{} {}", mini, maxi);
}


use std::io;

fn main() {
	let mut line = String::new();
	match io::stdin().read_line(&mut line) {
		Ok(_) => (),
		Err(e) => println!("Error: {}", e),
	}
	line = line.trim().to_string();
	let sint = line.split(" ");
	let number = sint.into_iter().map(|x| x.parse::<i32>().unwrap()).collect::<Vec<i32>>();

	let min_diff = 2i32.pow((number[1]) as u32)-1;
	let max_diff = 2i32.pow(number[2] as u32)-1;
	let min_sum = min_diff + (number[0]-number[1]);
	let max_sum = max_diff + (number[0]-number[2])*2i32.pow((number[2]-1) as u32);
	println!("{} {}", min_sum, max_sum);
}


#![allow(unused_variables)]
#![allow(unused_must_use)]

use std::io::{self, prelude::*};

fn main() {
    let stdin = io::stdin();
    let stdout = io::stdout();
    let mut input = Input::new(stdin.lock());
    let mut output = io::BufWriter::new(stdout.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(output ,$($format)*).unwrap());
    }
    let n: u32 = input.next();
    let l: u32 = input.next();
    let r: u32 = input.next();

    let min: u64 = 2u64.pow(l) - 1 + (n - l) as u64;
    let max: u64 = 2u64.pow(r) - 1 + (n - r) as u64 * 2u64.pow(r - 1);
    puts!("{} {}\n", min, max);

}

struct Input<R> {
    lines: io::Lines<R>,
    cur: String,
    split: std::str::SplitAsciiWhitespace<'static>, //'
}

impl<R: BufRead> Input<R> {
    fn new(reader: R) -> Input<R> {
        use std::mem::transmute;

        let mut lines = reader.lines();
        let cur = lines.next().unwrap().unwrap();
        let split = unsafe { transmute(cur.split_ascii_whitespace()) };
        Input { lines, cur, split }
    }
    fn update(&mut self) {
        use std::mem::transmute;
        self.cur = self.lines.next().unwrap().unwrap();
        unsafe { self.split = transmute(self.cur.split_ascii_whitespace()) };
    }
    fn next<F: std::str::FromStr>(&mut self) -> F {
        loop {
            if let Some(thing) = self.split.next() {
                return thing.parse().ok().unwrap();
            }
            self.update();
        }
    }
    fn iter<I: std::str::FromStr>(&mut self) -> InputIter<R, I> {
        InputIter {
            input: self,
            _phantom: std::marker::PhantomData,
        }
    }
}

struct InputIter<'a, R, I> {
    input: &'a mut Input<R>,
    _phantom: std::marker::PhantomData<I>,
}

impl<'a, R, I> Iterator for InputIter<'a, R, I>
where
    R: BufRead,
    I: std::str::FromStr,
{
    type Item = I;
    fn next(&mut self) -> Option<Self::Item> {
        Some(self.input.next())
    }
}


#[macro_use]
mod input {

use std;
use std::io;

const SPLIT_DELIMITER: char = ' ';

#[macro_export]
#[allow(unused_macros)]
macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

#[allow(dead_code)]
pub fn input_line_str() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

#[allow(dead_code)]
pub fn p<T>(t: T)
where
    T: std::fmt::Display,
{
    println!("{}", t);
}

#[allow(dead_code)]
pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
where
    T: std::str::FromStr,
{
    let mut v: Vec<Vec<T>> = Vec::new();

    for _ in 0..line {
        let vec_line = input_vector();
        v.push(vec_line);
    }
    v
}

#[allow(dead_code)]
pub fn input_vector<T>() -> Vec<T>
where
    T: std::str::FromStr,
{
    let mut v: Vec<T> = Vec::new();

    let s = input_line_str();
    let split_result = s.split(SPLIT_DELIMITER);
    for z in split_result {
        let buf = match z.parse() {
            Ok(r) => r,
            Err(_) => panic!("Parse Error"),
        };
        v.push(buf);
    }
    v
}

#[allow(dead_code)]
pub fn str2vec(s: &str) -> Vec<char> {
    let mut v: Vec<char> = Vec::new();
    for c in s.chars() {
        v.push(c);
    }
    v
}
}

#[allow(unused_imports)]
use input::*;

fn main() {
    let (n, l, r): (u64, u64, u64);
    input!(n, l, r);

    let mut min;
    min = 2_u64.pow(l as u32) - 1 + n - l;

    let max_value = 2_u64.pow(r as u32 - 1);
    let mut max = vec![1];

    for z in 1..n {
        let prev = *max.iter().last().unwrap();
        if prev * 2 > max_value {
            max.push(prev);
        } else {
            max.push(prev * 2);
        }
    }

    println!("{} {}", min,max.iter().sum::<u64>());
}


//spnauti-rusT
use std::io::*;
use std::str::{self,*};
use std::fmt::Debug;
#[allow(unused_imports)] use std::cmp::Ordering::{self,*};
#[allow(unused_imports)] use std::ops::{self,*};
#[allow(unused_imports)] use std::iter::{self,*};
#[allow(unused_imports)] use std::collections::*;
#[allow(unused_macros)]
macro_rules! m {
    ($c:tt, $x:expr, $y:expr) => {{
        let b = $y; let a = &mut $x;
        if b $c *a { *a = b; true } else { false }
    }};
}
#[allow(unused_macros)]
macro_rules! l {
    ($($v:ident),* = $i:ident.$f:ident $a:tt) => {
        $( let $v = $i.$f$a; )*
    };
    ($($v:ident),*:$t:ty = $i:ident.$f:ident $a:tt) => {
        $( let $v:$t = $i.$f$a; )*
    };
}
struct WordReader<'a> { it : SplitAsciiWhitespace<'a> }
#[allow(dead_code)]
impl<'a> WordReader<'a> {
    fn new<T: Read>(b: &mut String, mut r: T) -> WordReader {
        b.clear();
        r.read_to_string(b).ok();
        WordReader { it: b.split_ascii_whitespace() }
    }
    fn from_stdin(b: &mut String) -> WordReader {
        WordReader::new(b, stdin())
    }
    fn sl(&mut self) ->  &str { self.it.next().unwrap() }
    fn bs(&mut self) -> &[u8] { self.sl().as_bytes()    }
    fn s(&mut self) -> String { String::from(self.sl()) }
    fn i(&mut self) ->    i32 { self.p()                }
    fn f(&mut self) ->    f64 { self.p()                }
    fn u(&mut self) ->  usize { self.p()                }
    fn sk(&mut self, n: usize) { self.it.nth(n - 1); }
    fn ii(&mut self, n: usize) -> impl Iterator<Item=i32> {
        self.ip(n).into_iter()
    }
    fn vi(&mut self, n: usize) -> Vec<i32> {
        self.vp::<i32>(n)
    }
    fn p<T: FromStr>(&mut self) -> T where T::Err: Debug {
        self.sl().parse::<T>().unwrap()
    }
    fn ip<T: FromStr>(&mut self, n: usize) -> impl Iterator<Item=T> where T::Err: Debug {
        self.vp(n).into_iter()
    }
    fn vp<T: FromStr>(&mut self, n: usize) -> Vec<T> where T::Err: Debug {
        (0..n).map(|_| self.p()).collect()
    }
}
//------------------- End rusT

fn main() {
    let mut bin = String::new();
    let mut input = WordReader::from_stdin(&mut bin);

    l!(n,l,r = input.u());
    let min = (1 << l) + n - l - 1;
    let max = (n - r) * (1 << (r - 1)) + (1 << r) - 1;
    println!("{} {}", min, max);
}


//https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8 より
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

// ここまで

fn run() {
    input! {
        n: usize,
        l: usize,
        r: usize,
    }
    let mut k = 0;
    let mut b = 1;
    let mut x = 0;
    while k < l {
        x += b;
        b <<= 1;
        k += 1;
    }
    x += 1 * (n - k);
    let mut k = 0;
    let mut b = 1;
    let mut y = 0;
    while k + 1 < r {
        y += b;
        b <<= 1;
        k += 1;
    }
    y += (1 << (r - 1)) * (n - k);
    println!("{} {}", x, y);
}

fn main() {
    run();
}


// Try Codeforces
// author: Leonardone @ NEETSDKASU

fn main() {
    let mut stdin = String::new();
    std::io::Read::read_to_string(
        &mut std::io::stdin(),
        &mut stdin).unwrap();
    let mut stdin = stdin.split_whitespace();
    let mut get = || stdin.next().unwrap();
    macro_rules! get {
        () => (get!(i64));
        ($t:ty) => (get().parse::<$t>().unwrap());
    }

    let n = 14;
    let mut xs = vec![];
    for _ in 0..n {
        let x = get!();
        xs.push(x);
    }
    let mut ans = 0;
    for i in 0..n {
        let x = xs[i];
        let d = x / 14;
        let r = (x % 14) as usize;
        xs[i] = 0;
        let mut tmp = 0;
        for j in 0..n {
            let mut e = xs[j] + d;
            if i < j && j <= i + r {
                e += 1;
            } else if i < j + 14 && j + 14 <= i + r {
                e += 1;
            }
            if e % 2 == 0 {
                tmp += e;
            }
        }
        ans = std::cmp::max(ans, tmp);
        xs[i] = x;
    }
    println!("{}", ans);
}


fn main() {
    use std::io::prelude::*;
    use std::io;

    let mut input = String::new();
    io::stdin().read_to_string(&mut input).unwrap();

    let a: Vec<i64> = input.split_whitespace().map(|x| x.parse().unwrap())
        .collect();

    let mut max_ans = 0;

    let modulo = |a, b| {
        if a < 0 {
            a % b + b
        } else {
            a % b
        }
    };
    let modsub = |a, b| {
        modulo(a - b, 14)
    };

    for (i, &ai) in a.iter().enumerate() {
        let q = ai / 14;
        let r = ai % 14;

        let mut ans = 0;
        let mut j = i + 1;
        for _ in 0..13 {
            let cnt = a[modulo(j, 14)] + q + if r < modsub(j, i) as i64 { 0 } else { 1 };
            if cnt % 2 == 0 {
                ans += cnt;
            }

            j += 1
        }

        if q % 2 == 0 {
            ans += q;
        }

        if max_ans < ans {
            max_ans = ans;
        }
    }

    println!("{}", max_ans);
}


use std::io;
use std::str;

pub struct UnsafeScanner<R> {
    reader: R,
    buf_str: Vec<u8>,
    buf_iter: str::SplitAsciiWhitespace<'static>,
}

impl<R: io::BufRead> UnsafeScanner<R> {
    pub fn new(reader: R) -> Self {
        Self {
            reader,
            buf_str: vec![],
            buf_iter: "".split_ascii_whitespace(),
        }
    }

    /// This function should be marked unsafe, but noone has time for that in a
    /// programming contest. Use at your own risk!
    pub fn token<T: str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buf_iter.next() {
                return token.parse().ok().expect("Failed parse");
            }
            self.buf_str.clear();
            self.reader
                .read_until(b'\n', &mut self.buf_str)
                .expect("Failed read");
            self.buf_iter = unsafe {
                let slice = str::from_utf8_unchecked(&self.buf_str);
                std::mem::transmute(slice.split_ascii_whitespace())
            }
        }
    }
}

fn main() {
    use std::io::Write;

    let stdin = io::stdin();
    let stdout = io::stdout();
    let mut scan = UnsafeScanner::new(stdin.lock());
    let mut out = io::BufWriter::new(stdout.lock());

    let len: usize = scan.token();
    let k: usize = scan.token();

    let scores: Vec<i32> = (0..len).map(|_| scan.token()).collect();

    let test = scores[k - 1];
    let mut count = 0;
    for score in scores {
        if score >= test && score > 0 {
            count += 1;
        }
    }
    writeln!(out, "{}", count).ok();
}


use std::io;

fn main() {
    let mut intro = String::new();
    io::stdin().read_line(&mut intro).unwrap();

    let mut start_iter = intro.split_whitespace();
    let n = start_iter.next().unwrap();
    let k = start_iter.next().unwrap();

    let n: u8 = n.trim().parse().unwrap();
    let k: u8 = k.trim().parse().unwrap();

    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();

    let mut iter = input.split_whitespace();

    let mut output: u8 = 0;
    let mut cut_off: u8 = 0;

    for i in 0..n {
        let num = iter.next().unwrap();
        let num: u8 = num.parse().unwrap();

        if num == 0 { break; }

        if i + 1 < k  { output += 1; }
        else if i + 1 == k {
            cut_off = num;
            output += 1;
         }
        else if num >= cut_off {
            output += 1;
        }
        else { break; }
    }

    println!("{}", output);
}


use std::io;
use std::str;

fn main() {
    let input = take_input();
    let vals: Vec<&str> = split(&input);
    let k: usize = parse(vals[1]);
    let input = take_input();
    let vals = split(&input);
    let mut a: Vec<u32> = Vec::new();
    for num in vals {
        a.push(parse(num));
    }
    let p = next_round(k, a.as_mut_slice());
    println!("{}", p);
}

fn next_round(k: usize, a: &mut [u32]) -> u32 {
    let mut participants = 0;
    let pivot = a[k - 1];
    for i in a {
        if *i > 0 {
            if *i >= pivot {
                participants += 1;
            }
            else {
                break;
            }
        }
    }
    participants
}

fn take_input() -> String {
    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    input
}

fn parse<T: str::FromStr>(string: &str) -> T {
    let ret: T = match string.trim().parse() {
        Ok(x) => x,
        Err(_) => panic!("Not a number")
    };
    ret
}

fn split<'a>(string: &'a String) -> Vec<&'a str> {
    let ret: Vec<&'a str> = string.split(' ').collect();
    ret
}


fn main() {
    let mut first_input = String::new();
    std::io::stdin().read_line(&mut first_input).expect("Value Not found");

    let inputs: Vec<usize> = first_input.split_whitespace().map(|s| s.parse().expect("Parse error")).collect();

    let num_contestants: usize = inputs[0];
    let k_positon: usize = inputs[1];

    /*
     *println!("{:?}", inputs);
     */
    /*
     *println!("num_contestants = {} k_positon = {}", num_contestants, k_positon);
     */

    if (k_positon > num_contestants) || (num_contestants > 50) {
        return ()
    }

    let mut second_input = String::new();
    std::io::stdin().read_line(&mut second_input)
                    .expect("Value not found");

    let score_input: Vec<usize> = second_input.split_whitespace().map(|s| s.parse().expect("parse error")).collect();

    let count: usize = score_input.len();

    if (num_contestants != count) || (count > 100) {
        return ()
    }

    let mut i: usize = 0;
    for _i in 0..num_contestants-1 {
        if (score_input[i] > score_input[i+1]) || (score_input[i] == score_input[i+1]) {
            i += 1;
        }
        else {
            break;
        }
    }

    let mut final_count: usize = 0;
    let mut i: usize = 0;

    for _i in &score_input {
        if (score_input[k_positon -1] <= score_input[i]) && (score_input[i] > 0) {
            final_count = final_count + 1;
            i += 1;
        }
    }
    println!("{}", final_count);
}


use std::io::{stdin};

fn main() {
	let mut inp = String::from("");

	let n: u8;
	let k: u8;
	let mut v: Vec<u8>;

	stdin().read_line(&mut inp).expect("");

	n = inp.split_whitespace().nth(0).unwrap().parse().unwrap();
	k = inp.split_whitespace().nth(1).unwrap().parse::<u8>().unwrap() - 1;

	inp = String::from("");
	stdin().read_line(&mut inp).expect("");

	v = inp.split_whitespace().map(|a| a.parse::<u8>().unwrap()).collect();
	let key = v[k as usize];

	v.sort();

	let res = v.iter().position(|x| x >= &key && x != &0);
	if let Some(x) = res {
		println!("{}", n - x as u8);
	} else {
		println!("{}", 0);
	}
}


use std::io;
// use std::str::FromStr;

fn main() {
    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let ns : Vec<i32> = input.split_whitespace()
        .map(|x| x.parse::<i32>().unwrap())
        .collect::<Vec<i32>>();
    input.clear();
    io::stdin().read_line(&mut input).unwrap();
    let scores : Vec<i32> = input.split_whitespace()
        .map(|x| x.parse::<i32>().unwrap())
        .collect::<Vec<i32>>();
    let bar = scores[ns[1] as usize - 1];
    let mut a : i32 = 0;
    for score in &scores {
        if *score <= 0 || *score < bar {
            break;
        }
        a = a + 1;
    }
    println!("{}", a);
}


fn get_top_k(xs: Vec<i32>, k: i32) -> i32 {
    if let Some(&target_score) = xs.get(k as usize - 1) {
        if 0 < target_score {
            xs.into_iter().filter(|&x| x >= target_score).count() as i32
        } else {
            xs.into_iter().filter(|&x| x > 0).count() as i32
        }
    } else {
        0
    }
}

fn main() {
    let stdin = std::io::stdin();
    let mut line = String::new();

    stdin.read_line(&mut line).unwrap();

    if let &[_, k] = line
        .split_whitespace()
        .map(|v| v.parse::<i32>().unwrap())
        .collect::<Vec<i32>>()
        .as_slice()
    {
        line = String::new();
        stdin.read_line(&mut line).unwrap();

        let xs = line
            .split_whitespace()
            .map(|v| v.parse::<i32>().unwrap())
            .collect::<Vec<i32>>();

        println!("{}", get_top_k(xs, k));
    }
}


use std::io;

fn main() {
  let mut s = String::new();
  io::stdin().read_line(&mut s).unwrap();
  let mut v = s.split_whitespace().map(|a| a.parse::<i32>().unwrap());
  v.next().unwrap();
  let k = v.next().unwrap() as usize;
  s = String::new();
  io::stdin().read_line(&mut s).unwrap();
  let arr = s.split_whitespace().map(|a| a.parse::<i32>().unwrap());
  let mut c = 1;
  let mut sol = 0;

  for (i, x) in arr.enumerate() {
    if x > 0 && i < k {
      c = x;
    }
    if x >= c {
      sol += 1;
    }
  }
  println!("{}", sol);
}


use std::cmp::Ordering;

type Pair = (i8, i8);
fn input_pair() -> Pair {
    let mut buf = String::new();
    std::io::stdin().read_line(&mut buf).unwrap();
    let buf: Vec<i8> = buf
        .trim()
        .split_whitespace()
        .map(|elem| elem.parse().unwrap())
        .collect();
    (buf[0], buf[1])
}

fn main() {
    let (a, b) = input_pair();
    let (mut a_count, mut b_count, mut mid) = (0, 0, 0);

    for i in 1..=6 {
        match (a-i).abs().cmp(&(b-i).abs()) {
            Ordering::Less => a_count += 1,
            Ordering::Greater => b_count += 1,
            Ordering::Equal => mid += 1
        }
    }

    print!("{} {} {}", a_count, mid, b_count);
}


#[allow(unused_imports)]
use std::cmp::{max,min,Ordering};
#[allow(unused_imports)]
use std::collections::{HashMap,HashSet,VecDeque};

#[allow(unused_macros)]
macro_rules! readln {
    () => {{
        use std::io;

        let mut buf = String::new();
        io::stdin().read_line(&mut buf).unwrap();
        buf.trim().to_string()
    }};
    ( $t:ty ) => {{
        let input = readln!();
        input.parse::<$t>().unwrap()
    }};
    ( $( $t:ty ),+ ) => {{
        let input = readln!();
        let mut input = input.split_whitespace();
        (
            $(
                input.next().unwrap().parse::<$t>().unwrap(),
            )+
        )
    }}
}

#[allow(unused_macros)]
macro_rules! readvec {
    ( $t:ty ) => {{
        let input = readln!();
        let mut input = input.split_whitespace();
        let mut result = Vec::new();
        for elem in input {
            result.push(elem.parse::<$t>().unwrap());
        }
        result
    }}
}

fn main() {
  let (a,b) = readln!(i32,i32);
  let mut res = [0,0,0];
  for i in 1..7 {
    res[
      match (a-i).abs().cmp(&(b-i).abs()) {
        Ordering::Greater => 2,
          Ordering::Equal => 1,
          Ordering::Less => 0,
      }
    ] += 1;
  }
  println!("{} {} {}",res[0],res[1],res[2]);
}


use std::io;

fn main() {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    let rin = buf.split_whitespace().map(|c| c.parse::<u64>().unwrap()).collect::<Vec<_>>();
    let n = rin[0] + rin[1];

    let ret1 = factors(n, None);
    let x = ret1.last().unwrap();
    let ret3 = factors(rin[0], Some(*x));
    let ret4 = factors(rin[1], Some(*x));
//    println!("{:?} {:?}", ret3, ret4);

    let mut p: Option<u64> = None;
    'find: for i in ret1.iter().rev() {
        let x1 = i;
        let y1 = n / x1;
        for j in ret3.iter().rev() {
            let x2 = j;
            let y2 = rin[0] / x2;
//            println!("{} {}, {} {}", x1, y1, x2, y2);
            if x2 <= x1 && y2 <= y1 {
                let _p = (x1 + y1) * 2;
                if p.is_none() || _p < p.unwrap() {
                    p = Some(_p);
                }
                break;
            }
        }
        for j in ret4.iter().rev() {
            let x2 = j;
            let y2 = rin[1] / x2;
//            println!("{} {}, {} {}", x1, y1, x2, y2);
            if x2 <= x1 && y2 <= y1 {
                let _p = (x1 + y1) * 2;
                if p.is_none() || _p < p.unwrap() {
                    p = Some(_p);
                }
                break 'find;
            }
        }
    }
    println!("{}", p.unwrap());
}

fn factors(n: u64, max: Option<u64>) -> Vec<u64> {
    let sqrt = (n as f64).sqrt() as u64;
    let mut ret = Vec::<u64>::new();
    for i in 1..=sqrt {
        match max {
            Some(x) if i > x => {
//                println!("{}, {}", i, x);
                break;
            }
            _ => {}
        }
        if n % i == 0 {
            ret.push(i);
        }
    }
//    let ret = (1..=sqrt).rev().filter(|c| n % c == 0).collect::<Vec<_>>();
    return ret;
}


#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

// -----------------------------------------------
// Framework <https://github.com/vain0x/procon>
// -----------------------------------------------

#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($t:ty) =>
        (rl().parse::<$t>().unwrap());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($arg:expr),*) => {
        #[cfg(debug_assertions)]
        $(writeln!(stderr(), "{} = {:?}", stringify!($arg), $arg).unwrap());*
    };
}

#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim_right().to_owned()
}

trait IteratorExt: Iterator + Sized {
    fn vec(self) -> Vec<Self::Item> {
        self.collect()
    }
}

impl<T: Iterator> IteratorExt for T {}

// -----------------------------------------------
// Solution
// -----------------------------------------------

#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Rev<T>(pub T);

impl<T: PartialOrd> PartialOrd for Rev<T> {
    fn partial_cmp(&self, other: &Rev<T>) -> Option<Ordering> {
        other.0.partial_cmp(&self.0)
    }
}

impl<T: Ord> Ord for Rev<T> {
    fn cmp(&self, other: &Rev<T>) -> Ordering {
        other.0.cmp(&self.0)
    }
}

fn divs(n: i64) -> Vec<i64> {
    let r = (n as f64).sqrt().ceil() as i64;

    let mut xs = vec![];

    for k in 1..r + 1 {
        if n % k == 0 {
            xs.push(k);
        }
    }

    xs
}

fn solve_core(a: i64, b: i64) -> i64 {
    let mut ts = divs(a);
    let ss = ts.iter().rev().map(|&t| a / t).vec();
    ts.extend(ss);

    let ys = divs(a + b);

    // debug!((a, b), ts, ys);

    let mut l = 0;
    let mut r = 0;
    let mut q: BinaryHeap<(Rev<i64>, usize)> = BinaryHeap::new();
    let mut mi = std::i64::MAX;

    for ti in 0..ts.len() {
        let t = ts[ti];

        while l < ys.len() && ys[l] < t {
            l += 1;
        }

        r = max(r, l);

        while r < ys.len() && (a + b) / ys[r] >= a / t {
            let y = ys[r];
            let x = (a + b) / y;
            q.push((Rev(2 * (y + x)), r));

            r += 1;
        }

        while let Some(&(_, yi)) = q.peek() {
            if l <= yi {
                break;
            }

            q.pop();
        }

        // debug!((ti, t, l, r));

        if let Some((Rev(p), _)) = q.pop() {
            // debug!(p);
            mi = min(mi, p);
        }
    }

    mi
}

fn solve(a: i64, b: i64) -> i64 {
    let mut mi = solve_core(a, b);
    if a != b {
        mi = min(mi, solve_core(b, a));
    }
    mi
}

fn main() {
    let (a, b) = read!(i64, i64);
    println!("{}", solve(a, b))
}


use std::io::*;

fn read<T: std::str::FromStr>(i: &mut StdinLock) -> T {
    let mut s = String::new();
    i.by_ref().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn main() {
    // initialize stdin
    let sin = std::io::stdin();
    let mut sin = sin.lock();
    let sin = &mut sin;

    let input: String = read(sin);

    for c in input.as_str().chars() {
        match c {
            'H' | 'Q' | '9' => {
                println!("YES");
                return;
            }
            _ => (),
        }
    }

    println!("NO");
}


use std::io;

fn main() {
    let mut line = String::new();

    io::stdin().read_line(&mut line).expect("");
    if line.contains("H") || line.contains("Q") || line.contains("9") {
        println!("YES");
    } else {
        println!("NO");
    }
}


use std::io;

fn main() {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    let mut f = false;
    for c in s.chars() {
        if c == 'H' || c == 'Q' || c == '9' {
            f = true;
        }
    }
    if f {
        println!("YES");
    } else {
        println!("NO");
    }
}


fn main(){
    let mut line=String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    if line.find('Q')!=None || line.find('H')!=None || line.find('9')!=None{
        print!("YES");
    }
    else{print!("NO");}
}


use std::str::FromStr;

fn read() -> String {
    let mut res = String::new();
    std::io::stdin().read_line(&mut res).unwrap();
    res
}

struct Scanner {
    curr_iter: std::vec::IntoIter<String>,
}

impl Scanner {
    fn get_iter() -> std::vec::IntoIter<String> {
        read().split_whitespace().map(|x| x.to_string())
            .collect::<Vec<_>>().into_iter()
    }

    fn next <E:std::fmt::Debug,T:FromStr<Err=E>> (&mut self) -> T {
        let x = self.curr_iter.next();
        match x {
            Some(y) => { y.parse().unwrap() }
            None => {
                self.curr_iter = Self::get_iter();
                self.next()
            }
        }
    }

    fn new() -> Self {
        Self { curr_iter: Self::get_iter() }
    }
}

fn main() {
    let s = read().into_bytes();
    for c in s {
        if c == b'H' || c == b'Q' || c == b'9' {
            println!("YES");
            return;
        }
    }
    println!("NO");
}


use std::io;

fn main() -> std::io::Result<()> {
    let stdin = io::stdin();
    let mut input = String::new();
    stdin.read_line(&mut input)?;
    print!("{}", match hq9plus(input) {
        true => "YES",
        false => "NO"
    }.to_string());
    Ok(())
}

fn hq9plus(input: String) ->  bool {
    input.trim().chars().filter(|&c|
        c == 'H' || c == 'Q' || c == '9'
    ).collect::<String>().len() > 0
}
#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn test() {
        assert_eq!(hq9plus("Hi!".to_string()), true);
        assert_eq!(hq9plus("Codeforces".to_string()), false);

    }
}


use std::io;

fn check(text: String) -> &'static str {
    for c in text.chars() {
        match c {
            'H' | 'Q' | '9' => return "YES",
            _ => (),
        }
    }
    return "NO";
}

fn input() -> String {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().to_string()
}

fn main() {
    let text = input();
    println!("{}", check(text));
}


use std::io;

fn main() {
    let mut p = String::new();

    io::stdin()
        .read_line(&mut p)
        .unwrap();

    if p.contains("H") ||
       p.contains("Q") ||
       p.contains("9") {
        println!("YES");
    } else {
        println!("NO");
    }
}


// ---------- begin input macro ----------
// reference: https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, bytes) => {
        read_value!($iter, String).bytes().collect::<Vec<u8>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
// ---------- end input macro ----------

fn gcd(a: u128, b: u128) -> u128 {
    if b == 0 {
        a
    } else {
        gcd(b, a % b)
    }
}

fn run() {
    input! {
        x: u128,
        y: u128,
    }
    if gcd(x, y) > 1 {
        println!("Impossible");
        return;
    }
    // a / b < c / d
    let small = |a, b, c, d| a * d < b * c;
    // a / b > c / d
    let large = |a, b, c, d| a * d > b * c;
    let mut l = (0, 1);
    let mut r = (1, 0);
    let mut ans = vec![];
    while l.0 + r.0 < x || l.1 + r.1 < y {
        let (p, q) = (l.0 + r.0, l.1 + r.1);
        if small(p, q, x, y) {
            let mut ok = 1;
            let mut ng = 2;
            while small(l.0 + ng * r.0, l.1 + ng * r.1, x, y) {
                ok = ng;
                ng *= 2;
            }
            while ng - ok > 1 {
                let mid = (ok + ng) / 2;
                if small(l.0 + mid * r.0, l.1 + mid * r.1, x, y) {
                    ok = mid;
                } else {
                    ng = mid;
                }
            }
            ans.push((ok, 'A'));
            l = (l.0 + ok * r.0, l.1 + ok * r.1);
        } else {
            let mut ok = 1;
            let mut ng = 2;
            while large(ng * l.0 + r.0, ng * l.1 + r.1, x, y) {
                ok = ng;
                ng *= 2;
            }
            while ng - ok > 1 {
                let mid = (ok + ng) / 2;
                if large(mid * l.0 + r.0, mid * l.1 + r.1, x, y) {
                    ok = mid;
                } else {
                    ng = mid;
                }
            }
            ans.push((ok, 'B'));
            r = (ok * l.0 + r.0, ok * l.1 + r.1);
        }
    }
    let mut s = String::new();
    for (c, op) in ans {
        s.push_str(&format!("{}{}", c, op));
    }
    println!("{}", s);
}

fn main() {
    run();
}


use std::io;

fn main() {
    let mut s1 = String::new();
    let mut s2 = String::new();
    io::stdin().read_line(&mut s1).unwrap();
    io::stdin().read_line(&mut s2).unwrap();
    s1 = s1.trim().to_string();
    s2 = s2.trim().to_string();
    let n = s1.len();
    let mut flag = true;
    for i in 0..n {
        let c1 = s1.chars().nth(i);
        let c2 = s2.chars().nth(n-1-i);
        if c1 != c2 {
            flag = false;
        }
    }
    if flag {
        println!("YES");
    } else {
        println!("NO");
    }
}


fn main() {
    let word = get_input();
    let their_rev = get_input();
    let is_correct = their_rev == word.chars().rev().collect::<String>();
    println!("{}", if is_correct { "YES" } else { "NO" });

}

fn get_input() -> String {
    let mut buffer = String::new();
    std::io::stdin().read_line(&mut buffer).expect("Failed");
    buffer.trim().to_owned()
}

fn get_input_usize() -> usize {
    get_input().parse().unwrap()
}


fn main() {
    let mut s1 = String::new();
    std::io::stdin().read_line(&mut s1);
    let s1 = s1.trim();

    let mut s2 = String::new();
    std::io::stdin().read_line(&mut s2);
    let s2 = s2.trim();

    let s1_reversed: String = s1.chars().rev().collect();
    if s1_reversed.eq(s2) {
        println!("YES");
    } else {
        println!("NO");
    }
}


use std::io;

fn input() -> String {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().to_string()
}

fn main() {
    let (t, s) = (input(), input());
    if t == s.chars().rev().collect::<String>() {
        println!("YES");
    } else {
        println!("NO");
    }
}


fn main() {
    let mut line1 = String::new();
    let mut line2 = String::new();
    std::io::stdin().read_line(&mut line1).unwrap();
    std::io::stdin().read_line(&mut line2).unwrap();
    let rev = line2.chars().rev().collect::<String>();
    println!("{}", if rev.trim() == line1.trim() { "YES" } else { "NO"});
}


fn main() {
    let first_string = read_line();
    let second_string = read_line();

    if second_string == first_string.chars().rev().collect::<String>() {
        println!("YES");
    } else {
        println!("NO");
    }

}

fn read_line() -> String {
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).expect("Ошибка чтения");

    input.trim().to_string()
}


use std::io;
use std::io::Stdin;

fn read_line(stdin : &Stdin, line : &mut String) {
    match stdin.read_line(line) {
        Ok(_) => return,
        Err(msg) => panic!("Could not read line! Message: {}.", msg),
    }
}

fn main() {
    let stdin = io::stdin();
    let mut s = String::new();
    let mut t = String::new();
    read_line(&stdin, &mut s);
    read_line(&stdin, &mut t);
    let mut c_s = s.trim().chars();
    let mut c_t = t.trim().chars();
    let mut is_translation = false;
    loop {
        let x_s = c_s.next();
        let x_t = c_t.next_back();
        if x_s.is_none() && x_t.is_none() {
            is_translation = true;
            break;
        } else if x_s.is_some() && x_t.is_some() {
            let u_x_s = x_s.unwrap();
            let u_x_t = x_t.unwrap();
            if u_x_s == u_x_t {
                // Do nothing ...
            } else {
                break;
            }
        } else {
            break;
        }
    }
    if is_translation {
        println!("YES");
    } else {
        println!("NO");
    }
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        s : String,
        t : String,
    };
    let s: Vec<char> = s.chars().collect();
    let t: Vec<char> = t.chars().rev().collect();
    let n = s.len();
    for i in 0..n {
        if s.get(i) != t.get(i) {
            println!("NO");
            return;
        }
    }
    println!("YES");
}


use std::io;
use std::io::{stdout, BufWriter, Write};
use std::str::FromStr;

#[allow(dead_code)]
fn read_line() -> String {
    let mut buffer = String::new();
    io::stdin()
        .read_line(&mut buffer)
        .expect("failed to read line");

    buffer
}

#[allow(dead_code)]
fn read<T: FromStr>() -> Result<T, T::Err> {
    read_line().trim().parse::<T>()
}

#[allow(dead_code)]
fn read_vec<T: FromStr>() -> Result<Vec<T>, T::Err> {
    read_line()
        .split_whitespace()
        .map(|x| x.parse::<T>())
        .collect()
}

fn main() {
    let mut writer = BufWriter::new(stdout());
    let n = read().unwrap();
    for _ in 0..n {
        let qq = read().unwrap();
        writeln!(writer, "{}", 2u64.pow(qq) - 1).unwrap();
    }
    writer.flush().unwrap();
}


use std::io;
#[allow(unused)]
use std::collections::{HashMap, BTreeMap, VecDeque, HashSet, BinaryHeap};

#[allow(dead_code)]
fn gets() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim_end().to_string()
}

#[allow(unused_macros)]
macro_rules! read_vec {
    ($ty:ty) => {{
        let line = gets();
        let mut it = line.split_whitespace();
        let mut v = Vec::new();
        while let Some(value) = it.next() {
            v.push(value.parse::<$ty>().unwrap());
        }
        v
    }}
}

#[allow(unused_macros)]
macro_rules! read {
    ( $ty:ty) => {
        gets().split_whitespace().next().unwrap().parse::<$ty>().unwrap()
    };
    ( $($ty:ty),* ) => {{
        let line = gets();
        let mut it = line.split_whitespace();
        ( $(it.next().unwrap().parse::<$ty>().unwrap(),)* )
    }};
    ( $( $ty:ty ),+ ,) => {
		read![ $( $ty ),* ]
    };
}

fn main() {
    use std::io::Write;
    let out = std::io::stdout();
    let mut out = std::io::BufWriter::new(out.lock());

    for _ in 0..read!(usize) {
        let value = read!(usize);
        writeln!(out, "{}", (1 << value) - 1).unwrap();
    }
}


use std::io;

fn read_integer() -> u32 {
    let mut input_text = String::new();
    io::stdin().read_line(&mut input_text).unwrap();
    return input_text.trim().parse::<u32>().unwrap();
}

fn bin_pow(n: u64, power: u32) -> u64 {
    if power == 0 {
        return 1;
    } else if power % 2 == 0 {
        return bin_pow(n * n, power / 2);
    } else {
        return n * bin_pow(n, power - 1);
    }
}

fn main() {
    let t = read_integer();

    for _ in 0..t {
        let n = read_integer();
        println!("{}", bin_pow(2, n) - 1);
    }
}


use std::io;
use std::str::FromStr;

#[allow(dead_code)]
fn read_line() -> String {
    let mut buffer = String::new();
    io::stdin().read_line(&mut buffer).unwrap();

    buffer.trim().to_string()
}

#[allow(dead_code)]
fn read<T : FromStr>() -> Result<T, T::Err>{
    read_line().trim().parse::<T>()
}

#[allow(dead_code)]
fn read_vec<T : FromStr>() -> Result< Vec<T>, T::Err>{
    read_line().split_whitespace().map(|x| x.parse::<T>()).collect()
}

fn solve() {
    let n = read::<u32>().unwrap();

    println!("{}", i64::pow(2, n) - 1);
}

fn main() {
    let t = read::<i32>().unwrap();
    for _i in 0..t {
        solve();
    }
}


use std::vec::Vec;
use std::string::String;

struct Inp {
    // reversed input words for O(1) popping
    words: Vec<String>,
}

impl Inp {
    fn new() -> Self {
        Inp {
            words: Vec::new(),
        }
    }

    fn read<T: std::str::FromStr>(&mut self) -> T {
        if let Some(s) = self.words.pop() {
            match s.parse() {
                Ok(x) => x,
                Err(_) => panic!("Parse error")
            }
        } else {
            loop {
                let mut buf = String::new();
                std::io::stdin().read_line(&mut buf).unwrap();
                self.words = buf.trim().split_ascii_whitespace().rev().map(|x| x.to_owned()).collect();
                if let Some(s) = self.words.pop() {
                    break match s.parse() {
                        Ok(x) => x,
                        Err(_) => panic!("Parse error")
                    }
                }
            }
        }
    }
}

pub fn solve(n: u32) -> i64 {
    2i64.pow(n) - 1
}

fn main() {
    let mut inp = Inp::new();

    let tries = inp.read();
    for _ in 0..tries {
        let x = inp.read();
        println!("{}", solve(x));
    }
}

#[cfg(test)]
mod test {
    #[test]
    fn given() {
        assert_eq!(crate::solve(3), 7);
        assert_eq!(crate::solve(4), 15);
        assert_eq!(crate::solve(1), 1);
    }
}