#![allow(unused_imports)]
use input::*;
use std::{
    collections::*,
    io::{self, BufWriter, Write},
};
fn run<I: Input, O: Write>(mut ss: I, mut out: O) {
    let t: u32 = ss.parse();
    for _ in 0..t {
        case(&mut ss, &mut out);
    }
}
fn case<I: Input, O: Write>(mut ss: I, mut out: O) {
    let n: i32 = ss.parse();
    let ans = (1 << n) - 1;
    wln!(out, "{}", ans)
}
fn main() {
    let stdin = io::stdin();
    let ss = SplitWs::new(stdin.lock());
    let stdout = io::stdout();
    let out = BufWriter::new(stdout.lock());
    run(ss, out);
}
pub mod input {
    use std::{
        io::{self, prelude::*},
        marker::PhantomData,
        mem,
    };
    pub trait Input {
        fn bytes(&mut self) -> &[u8];
        fn bytes_vec(&mut self) -> Vec<u8> {
            self.bytes().to_vec()
        }
        fn str(&mut self) -> &str {
            std::str::from_utf8(self.bytes()).unwrap()
        }
        fn parse<T: Parse>(&mut self) -> T {
            self.parse_with(DefaultParser)
        }
        fn parse_with<T>(&mut self, mut parser: impl Parser<T>) -> T {
            parser.parse(self)
        }
        fn seq<T: Parse>(&mut self) -> Seq<T, Self, DefaultParser> {
            self.seq_with(DefaultParser)
        }
        fn seq_with<T, P: Parser<T>>(&mut self, parser: P) -> Seq<T, Self, P> {
            Seq {
                input: self,
                parser,
                marker: PhantomData,
            }
        }
    }
    impl<T: Input> Input for &mut T {
        fn bytes(&mut self) -> &[u8] {
            (**self).bytes()
        }
    }
    pub trait Parser<T> {
        fn parse<I: Input + ?Sized>(&mut self, s: &mut I) -> T;
    }
    impl<T, P: Parser<T>> Parser<T> for &mut P {
        fn parse<I: Input + ?Sized>(&mut self, s: &mut I) -> T {
            (**self).parse(s)
        }
    }
    pub trait Parse {
        fn parse<I: Input + ?Sized>(s: &mut I) -> Self;
    }
    pub struct DefaultParser;
    impl<T: Parse> Parser<T> for DefaultParser {
        fn parse<I: Input + ?Sized>(&mut self, s: &mut I) -> T {
            T::parse(s)
        }
    }
    pub struct Seq<'a, T, I: ?Sized, P> {
        input: &'a mut I,
        parser: P,
        marker: PhantomData<*const T>,
    }
    impl<'a, T, I: Input, P: Parser<T>> Iterator for Seq<'a, T, I, P> {
        type Item = T;
        #[inline]
        fn next(&mut self) -> Option<Self::Item> {
            Some(self.input.parse_with(&mut self.parser))
        }
        fn size_hint(&self) -> (usize, Option<usize>) {
            (!0, None)
        }
    }
    impl Parse for char {
        #[inline]
        fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
            let s = s.bytes();
            debug_assert_eq!(s.len(), 1);
            *s.first().expect("zero length") as char
        }
    }
    macro_rules ! tuple { ($ ($ T : ident) ,*) => { impl <$ ($ T : Parse) ,*> Parse for ($ ($ T ,) *) { # [inline] # [allow (unused_variables)] # [allow (clippy :: unused_unit)] fn parse < I : Input + ? Sized > (s : & mut I) -> Self { ($ ($ T :: parse (s) ,) *) } } } ; }
    tuple!();
    tuple!(A);
    tuple!(A, B);
    tuple!(A, B, C);
    tuple!(A, B, C, D);
    tuple!(A, B, C, D, E);
    tuple!(A, B, C, D, E, F);
    tuple!(A, B, C, D, E, F, G);
    #[cfg(feature = "newer")]
    impl<T: Parse, const N: usize> Parse for [T; N] {
        fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
            use std::{mem::MaybeUninit, ptr};
            struct Guard<T, const N: usize> {
                arr: [MaybeUninit<T>; N],
                i: usize,
            }
            impl<T, const N: usize> Drop for Guard<T, N> {
                fn drop(&mut self) {
                    unsafe {
                        ptr::drop_in_place(&mut self.arr[..self.i] as *mut _ as *mut [T]);
                    }
                }
            }
            let mut g = Guard::<T, N> {
                arr: unsafe { MaybeUninit::uninit().assume_init() },
                i: 0,
            };
            while g.i < N {
                g.arr[g.i] = MaybeUninit::new(s.parse());
                g.i += 1;
            }
            unsafe { mem::transmute_copy(&g.arr) }
        }
    }
    macro_rules! uint {
        ($ ty : ty) => {
            impl Parse for $ty {
                #[inline]
                fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
                    let s = s.bytes();
                    s.iter().fold(0, |x, d| 10 * x + (0xf & d) as $ty)
                }
            }
        };
    }
    macro_rules! int {
        ($ ty : ty) => {
            impl Parse for $ty {
                #[inline]
                fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
                    let f = |s: &[u8]| {
                        s.iter()
                            .fold(0 as $ty, |x, d| (10 * x).wrapping_add((0xf & d) as $ty))
                    };
                    let s = s.bytes();
                    if let [b'-', s @ ..] = s {
                        f(s).wrapping_neg()
                    } else {
                        f(s)
                    }
                }
            }
        };
    }
    macro_rules! float {
        ($ ty : ty) => {
            impl Parse for $ty {
                fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
                    const POW: [$ty; 18] = [
                        1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13,
                        1e14, 1e15, 1e16, 1e17,
                    ];
                    let s = s.bytes();
                    let (minus, s) = if let Some((b'-', s)) = s.split_first() {
                        (true, s)
                    } else {
                        (false, s)
                    };
                    let (int, fract) = if let Some(p) = s.iter().position(|c| *c == b'.') {
                        (&s[..p], &s[p + 1..])
                    } else {
                        (s, &[][..])
                    };
                    let x = int
                        .iter()
                        .chain(fract)
                        .fold(0u64, |x, d| 10 * x + (0xf & *d) as u64);
                    let x = x as $ty;
                    let x = if minus { -x } else { x };
                    let exp = fract.len();
                    if exp == 0 {
                        x
                    } else if let Some(pow) = POW.get(exp) {
                        x / pow
                    } else {
                        x / (10.0 as $ty).powi(exp as i32)
                    }
                }
            }
        };
    }
    macro_rules! from_bytes {
        ($ ty : ty) => {
            impl Parse for $ty {
                #[inline]
                fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
                    s.bytes().into()
                }
            }
        };
    }
    macro_rules! from_str {
        ($ ty : ty) => {
            impl Parse for $ty {
                #[inline]
                fn parse<I: Input + ?Sized>(s: &mut I) -> Self {
                    s.str().into()
                }
            }
        };
    }
    macro_rules ! impls { ($ m : ident , $ ($ ty : ty) ,*) => { $ ($ m ! ($ ty) ;) * } ; }
    impls!(uint, usize, u8, u16, u32, u64, u128);
    impls!(int, isize, i8, i16, i32, i64, i128);
    impls!(float, f32, f64);
    impls!(from_bytes, Vec<u8>, Box<[u8]>);
    impls!(from_str, String);
    #[derive(Clone)]
    pub struct SplitWs<T> {
        src: T,
        buf: Vec<u8>,
        pos: usize,
        len: usize,
    }
    const BUF_SIZE: usize = 1 << 26;
    impl<T: Read> SplitWs<T> {
        pub fn new(src: T) -> Self {
            Self {
                src,
                buf: vec![0; BUF_SIZE],
                pos: 0,
                len: 0,
            }
        }
        #[inline(always)]
        fn peek(&self) -> &[u8] {
            unsafe { self.buf.get_unchecked(self.pos..self.len) }
        }
        #[inline(always)]
        fn consume(&mut self, n: usize) -> &[u8] {
            let pos = self.pos;
            self.pos += n;
            unsafe { self.buf.get_unchecked(pos..self.pos) }
        }
        fn read(&mut self) -> usize {
            self.buf.copy_within(self.pos..self.len, 0);
            self.len -= self.pos;
            self.pos = 0;
            if self.len == self.buf.len() {
                self.buf.resize(2 * self.buf.len(), 0);
            }
            loop {
                match self.src.read(&mut self.buf[self.len..]) {
                    Ok(n) => {
                        self.len += n;
                        return n;
                    }
                    Err(e) if e.kind() == io::ErrorKind::WouldBlock => {}
                    Err(e) => panic!("io error: {:?}", e),
                }
            }
        }
    }
    impl<T: Read> Input for SplitWs<T> {
        #[inline]
        fn bytes(&mut self) -> &[u8] {
            loop {
                if let Some(del) = self.peek().iter().position(|c| c.is_ascii_whitespace()) {
                    if del > 0 {
                        let s = self.consume(del + 1);
                        return s.split_last().unwrap().1;
                    } else {
                        self.consume(1);
                    }
                } else if self.read() == 0 {
                    return self.consume(self.len - self.pos);
                }
            }
        }
    }
}
pub mod macros {
    #[macro_export]
    macro_rules ! w { ($ ($ arg : tt) *) => { write ! ($ ($ arg) *) . unwrap () ; } }
    #[macro_export]
    macro_rules ! wln { ($ dst : expr $ (, $ ($ arg : tt) *) ?) => { { writeln ! ($ dst $ (, $ ($ arg) *) ?) . unwrap () ; # [cfg (debug_assertions)] $ dst . flush () . unwrap () ; } } }
    #[macro_export]
    macro_rules! w_iter {
        ($ dst : expr , $ fmt : expr , $ iter : expr , $ delim : expr) => {{
            let mut first = true;
            for elem in $iter {
                if first {
                    w!($dst, $fmt, elem);
                    first = false;
                } else {
                    w!($dst, concat!($delim, $fmt), elem);
                }
            }
        }};
        ($ dst : expr , $ fmt : expr , $ iter : expr) => {
            w_iter!($dst, $fmt, $iter, " ")
        };
    }
    #[macro_export]
    macro_rules ! w_iter_ln { ($ dst : expr , $ ($ t : tt) *) => { { w_iter ! ($ dst , $ ($ t) *) ; wln ! ($ dst) ; } } }
    #[macro_export]
    macro_rules ! e { ($ ($ t : tt) *) => { # [cfg (debug_assertions)] eprint ! ($ ($ t) *) } }
    #[macro_export]
    macro_rules ! eln { ($ ($ t : tt) *) => { # [cfg (debug_assertions)] eprintln ! ($ ($ t) *) } }
    #[macro_export]
    #[doc(hidden)]
    macro_rules ! __tstr { ($ h : expr $ (, $ t : expr) +) => { concat ! (__tstr ! ($ ($ t) ,+) , ", " , __tstr ! (@)) } ; ($ h : expr) => { concat ! (__tstr ! () , " " , __tstr ! (@)) } ; () => { "\x1B[94m[{}:{}]\x1B[0m" } ; (@) => { "\x1B[1;92m{}\x1B[0m = {:?}" } }
    #[macro_export]
    macro_rules ! d { ($ ($ a : expr) ,*) => { if std :: env :: var ("ND") . map (| v | & v == "0") . unwrap_or (true) { eln ! (__tstr ! ($ ($ a) ,*) , file ! () , line ! () , $ (stringify ! ($ a) , $ a) ,*) ; } } ; }
}


use std::io::{stdin, stdout, BufWriter, Write};

#[derive(Default)]
struct Scanner {
	buffer: Vec<String>,
}
impl Scanner {
	fn next<T: std::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();
			stdin().read_line(&mut input).expect("Failed read");
			self.buffer =
				input.split_whitespace().rev().map(String::from).collect();
		}
	}
}

fn main() {
	let mut scan = Scanner::default();
	let out = &mut BufWriter::new(stdout());
	let test_cases = scan.next::<u32>();
	for _i in 0..test_cases {
		let n = scan.next::<u32>();
		let result: u32 = 2u32.pow(n) - 1u32;
		writeln!(out, "{}", result).ok();
	}
}


fn main() {
    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());

    let t: usize = sc.read();
    for _ in 0..t {
        let n: i64 = sc.read();
        println!("{}", (1 << n) - 1);
    }
}

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> Self {
        Self(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        use std::io::Write;
        self.1.write_all(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn usize0(&mut self) -> usize {
        self.read::<usize>() - 1
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


fn find_min(m: usize, s: usize) -> String {
    let mut num = vec![0; m];
    num[0] = 1;
    let mut i = m - 1;
    let mut sum = 1;

    while sum + 9 < s {
        num[i] = 9;
        i -= 1;
        sum += 9;
    }

    num[i] += (s - sum) as u8;
    vec_to_num(&num)
}

fn find_max(m: usize, s: usize) -> String {
    let mut num = vec![9; m];
    let mut i = m - 1;
    let mut sum = 9 * m;

    while sum - 9 > s {
        num[i] = 0;
        i -= 1;
        sum -= 9;
    }

    num[i] -= (sum - s) as u8;
    vec_to_num(&num)
}

fn vec_to_num(v: &Vec<u8>) -> String {
    v.into_iter()
        .map(|digit| (digit + 48) as char)
        .collect::<String>()
}

fn main() {
    let (m, s) = {
        let mut buf = String::new();
        std::io::stdin().read_line(&mut buf).unwrap();
        let temp: Vec<usize> = buf
            .trim()
            .split_whitespace()
            .map(|elem| elem.parse().unwrap())
            .collect();
        (temp[0], temp[1])
    };

    if m == 1 && s == 0 {
        println!("0 0");
    } else if s < 1 || s > 9 * m {
        println!("-1 -1");
    } else {
        println!("{} {}", find_min(m, s), find_max(m, s))
    }
}


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);
    }
}

fn max_num_with_m_digits_and_digit_sum(m : usize, s : usize, max_num : &mut Vec<u8>) {
    if (m * 9) < s {
        // Do nothing ...
    } else {
        if s == 0 {
            if m == 1 {
                max_num.push(0);
            } else {
                // Do nothing ...
            }
        } else {
            let mut cur_sum = 0;
            for _ in 0 .. m {
                let diff = s - cur_sum;
                if diff >= 9 {
                    max_num.push(9);
                    cur_sum = cur_sum + 9;
                } else {
                    max_num.push(diff as u8);
                    cur_sum = cur_sum + diff;
                }
            }
        }
    }
}

fn min_num_with_m_digits_and_digit_sum(m : usize, max_num : &mut Vec<u8>) {
    if max_num.is_empty() {
        // Do nothing ...
    } else {
        max_num.reverse();
        if max_num[0] == 0 {
            if m == 1 {
                // Do nothing ...
            } else {
                max_num[0] = 1;
                for i in 1 .. m {
                    if max_num[i] == 0 {
                        // Do nothing ...
                    } else {
                        max_num[i] = max_num[i] - 1;
                        break;
                    }
                }
            }
        }
    }
}

fn print_vec(v : &Vec<u8>) {
    for &x in v.iter() {
        print!("{}", x);
    }
}

fn main() {
    let stdin = io::stdin();
    let mut m_s = vec![];
    read_ts(&stdin, &mut m_s);
    let m = m_s[0];
    let s = m_s[1];
    let mut max_num = vec![];
    max_num_with_m_digits_and_digit_sum(m, s, &mut max_num);
    if max_num.is_empty() {
        println!("-1 -1");
    } else {
        let mut max_num_copy = max_num.to_vec();
        min_num_with_m_digits_and_digit_sum(m, &mut max_num_copy);
        print_vec(&max_num_copy);
        print!(" ");
        print_vec(&max_num);
        println!();
    }
}


// https://codeforces.com/problemset/problem/489/C
use std::io;
use std::char;

fn reverse(cadena: &String) -> String {
    let mut ans = String::from("");
    for ch in cadena.chars().rev() {
        ans.push(ch);
    }
    ans
}

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 m = words[0] as usize;
    let mut s = words[1];
    let mut _t = words[1];

    if s == 0 && m != 1 {
        println!("-1 -1");
        return;
    }

    if s == 0 && m == 1 {
        println!("0 0");
        return;
    }

    // lets construct maxima
    let mut maxima = String::from("");

    while s > 0 {
        if s >= 9 {
            maxima = format!("9{}", maxima);
            s -= 9;
        } else {
            maxima = format!("{}{}", maxima, s);
            s -= s;
        }
    }

    if maxima.len() > m {
        println!("-1 -1");
        return;
    }

    while maxima.len() < m {
        maxima = format!("{}0", maxima);
    }

    // lets construct minima
    let mut chars: Vec<char> = reverse(&maxima).chars().collect();
    let mut minima = String::from("");

    if chars[0] == '0' {
        chars[0] = '1';
        for i in 1..chars.len() {
            if chars[i] != '0' {
                chars[i] = char::from_digit(chars[i].to_digit(10).unwrap()-1,10).unwrap();
                break;
            }
        }
    }

    for ch in chars {
        minima.push(ch);
    }

    println!("{} {}", minima, maxima);
}


fn main() -> Result<(), Box<dyn std::error::Error>> {
    let data = read_input();
    let (len, sum) = (data[0], data[1]);

    if 9 * len < sum {
        println!("-1 -1");
        return Ok(());
    }

    if sum == 0 {
        if len > 1 {
            println!("-1 -1");
        } else {
            println!("0 0");
        }
        return Ok(());
    }

    if sum == 1 {
        let mut ans = String::with_capacity(len);
        ans.push('1');

        for _ in 1..len {
            ans.push('0');
        }
        println!("{} {}", ans, ans);
        return Ok(());
    }

    if (sum >= 1 && sum <= 9) && (len == 1) {
        println!("{} {}", sum, sum);
        return Ok(());
    }

    if sum % 9 == 0 && sum / 9 == len {
        let mut ans = String::with_capacity(len);
        for _ in 0..len {
            ans.push('9')
        }
        println!("{} {}", ans, ans);
        return Ok(());
    }

    let mut digits = vec![0; len];
    let mut max_digits = vec![0; len];

    let nines = sum / 9;
    let rem = sum % 9;

    let start = len - nines;
    for i in (start..len).rev() {
        digits[i] = 9;
    }

    if len - nines > 1 {
        if rem > 0 {
            digits[start - 1] = rem - 1;
            digits[0] = 1;
        } else {
            digits[start] -= 1;
            digits[0] = 1;
        }
    } else {
        if rem > 0 {
            digits[0] = rem;
        } else {
            digits[start] -= 1;
            digits[0] = 1;
        }
    }

    for i in 0..nines {
        max_digits[i] = 9;
    }
    if rem != 0 {
        max_digits[nines] = rem;
    }

    for d in digits {
        print!("{}", d);
    }
    print!(" ");

    for d in max_digits {
        print!("{}", d);
    }
    println!();

    Ok(())
}

fn read_input() -> Vec<usize> {
    let mut buffer = String::new();

    std::io::stdin()
        .read_line(&mut buffer)
        .expect("Failed to get input");

    buffer
        .trim()
        .split_whitespace()
        .map(|x| x.parse().expect("Failed to parse number"))
        .collect()
}


//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 }
    }};
}
struct WordReader {
    it : std::vec::IntoIter<String>,
}
#[allow(dead_code)]
impl WordReader {
    fn new<T: std::io::Read>(mut reader: T) -> WordReader {
        let mut s = String::new();
        reader.read_to_string(&mut s).unwrap();
        WordReader {
            it : s.split_ascii_whitespace().map(String::from)
            .collect::<Vec<_>>().into_iter()
        }
    }
    fn from_stdin() -> WordReader {
        WordReader::new(std::io::stdin())
    }
    fn s(&mut self) -> String {
        self.it.next().unwrap()
    }
    fn ab(&mut self) -> Vec<u8> {
        self.it.next().unwrap().into_bytes()
    }
    fn i(&mut self) -> i32 {
        self.it.next().unwrap().parse().unwrap()
    }
    fn ai(&mut self, n: usize) -> Vec<i32> {
        let mut a = Vec::with_capacity(n);
        for _ in 0..n { a.push(self.i()); }
        a
    }
}

fn main() {
    let mut input = WordReader::from_stdin();
    let n = input.i();
    let s = input.i();
    if (s == 0 && n > 1) || n * 9 < s {
        println!("-1 -1");
    } else if n == 1 {
        println!("{} {}", s, s);
    } else {
        let ok = |i,d,t| {
            if i == n - 1 && d == 0 { return false; }
            let t1 = t - d;
            t1 >= 0 && t1 <= 9 * i
        };
        (0..n).rev().fold(s, |t,i| {
            let d = (0..10).filter(|&d| ok(i,d,t)).min().unwrap();
            print!("{}", d);
            t - d
        });
        print!(" ");
        (0..n).rev().fold(s, |t,i| {
            let d = (0..10).filter(|&d| ok(i,d,t)).max().unwrap();
            print!("{}", d);
            t - d
        });
        println!("");
    }
}


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(),
            )+
        )
    }}
}

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 (n,m) = readln!(i32,i32);
    if n==1 && m==0 {
      println!("0 0");
      return;
    }
    if (9*n < m || m==0) {
        println!("-1 -1");
        return;
    }
    let mut m1 = m;
    if (9*(n-1) >= m) {
        m1 -= 1;
    }

    let mut l = String::from("");
    let mut used = 0;
    for i in 0..n {
        let mut touse = 0;
        if i == n-1 {
            touse = m-used;
        } else {
            touse = std::cmp::min(m1-used,9);
        }
        l.push((('0' as u8) + (touse as u8)) as char);
        used += touse;
    }

    let mut r = String::from("");
    let mut used = 0;
    for i in 0..n {
        let touse = std::cmp::min(m-used,9);
        r.push((('0' as u8) + (touse as u8)) as char);
        used += touse;
    }
    println!("{} {}",l.chars().rev().collect::<String>(),r);
}


use std::io;

fn read_line(buf: &mut String) {
    buf.clear();
    match io::stdin().read_line(buf) {
        Err(error) => println!("error! {}",error),
        _ => {}
    }
}

fn is_valid(m: i32, n: i32) -> bool {
    if n==0 || n>9*m {
        return false;
    }
    return true;
}
fn get_max(m:i32,n:i32) {
    let mut max = Vec::<u8>::new();
    max.reserve(m as usize);
    for _ in 0..m {
        max.push(0);
    }
    let mut n_copy = n;
    for index in 0..m {
        if n_copy > 9 {
            max[index as usize]+=9;
            n_copy -= 9;
        }
        else {
            max[index as usize]+= n_copy as u8;
            break;
        }
    }
    print!(" ");
    for x in max {
        print!("{}",x);
    }
    println!("");

}
fn get_min(m:i32, n:i32) {
    let mut min = Vec::<u8>::new();
    min.reserve(m as usize);
    min.push(1);
    for _ in 1..m {
        min.push(0);
    }
    let mut n_copy = n-1;
    for index in (0..(m)).rev() {
        if n_copy > 9 {
            min[index as usize]+=9;
            n_copy -= 9;
        }
        else {
            min[index as usize]+= n_copy as u8;
            break;
        }
    }
    for x in min {
        print!("{}",x);
    }

}

fn main() {
    let mut buf : String = String::new();
    read_line(&mut buf);
    let mut string_iter = buf.trim().split_whitespace();
    let m = string_iter.next().unwrap().parse::<i32>().unwrap();
    let n = string_iter.next().unwrap().parse::<i32>().unwrap();

    if !is_valid(m,n) {
        if m==1 && n==0 {
            println!("0 0");
        }
        else{
            println!("-1 -1");
        }
    }
    else {
        get_min(m,n);
        get_max(m,n);
    }
}


#[allow(unused)] use std::io::*;
#[allow(unused)] use std::collections::*;
#[allow(unused)] use std::mem::*;
#[allow(unused)] use std::num::*;
#[allow(unused)] use std::cmp::*;
#[allow(unused)] use std::thread::*;
#[allow(unused)] use std::ops::*;
#[allow(unused)] use std::marker::*;
#[allow(unused)] macro_rules! scan { ($($x:ty), +) => {{
    let mut inp = String::new(); stdin().read_line(&mut inp).ok();
    let s = inp.split(' ').map(|x| x.trim()).filter(|x| x.len() != 0).collect();
    let mut cnt : usize = 0;
    fn next<T>(cnt: &mut usize, p: &Vec<&str>) -> T where T:std::str::FromStr
    { *cnt += 1; p[*cnt-1].parse().ok().unwrap() }
    ($(next::<$x>(&mut cnt, &s)), +)
    }}; }
#[allow(unused)] macro_rules! arr { ($($n:expr, $T:ty), +) => {{
    let mut inp = String::new(); stdin().read_line(&mut inp).ok();
    let mut s = inp.split(' ').map(|x| x.trim()).filter(|x| x.len() != 0);
    ($({let mut v = Vec::new(); v.reserve(($n) as usize);
        for _ in 0..$n { let t = s.next(); if t == None { break; }
        v.push(t.unwrap().parse::<$T>().unwrap()); } v }),+)
    }}; }
///////////////////////////////////////////////////////////////////////////////

fn main()
{
    let (n, mut s) = scan!(usize, u64);
    if n == 1 && s == 0 { println!("0 0"); return; }
    if (9 * n as u64) < s || s < 1 { println!("-1 -1"); return; }
    let mut a = vec![0; n];
    for i in 0..n { a[i] += min(s, 9); s -= min(s, 9); }
    let mut b = a.iter().rev().map(|&x| x).collect::<Vec<u64>>();
    if b[0] == 0 { for i in 0..n { if b[i] > 0 { b[i] -= 1; b[0] += 1; break; } } }
    for i in 0..n { print!("{}", b[i]); } print!(" ");
    for i in 0..n { print!("{}", a[i]); } println!();
}


struct Scan {
    buffer: std::collections::VecDeque<String>,
}

impl Scan {
    fn new() -> Scan {
        Scan {
            buffer: std::collections::VecDeque::new(),
        }
    }

    fn next<T: std::str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buffer.pop_front() {
                break token.parse::<T>().ok().unwrap();
            }
            let mut line = String::new();
            std::io::stdin().read_line(&mut line).expect("Fail to read");
            self.buffer = line.split_whitespace().map(String::from).collect();
        }
    }
}

fn _main() {
    let mut scan = Scan::new();
    let n: usize = scan.next();
    // r(a_1 a_2 a_3...a_n) = a_2 a_3 .. a_n+1
    // -
    // a_1 a_2 a_3..a_n
    // ----------------
    // rS - S
    // therefore
    // S(r-1)=a_n+1 -a_1
    // S = (a_n+1 - a_1) / (r - 1)
    let result: u64 = 2u64.pow(n as u32 + 1) - 2;
    println!("{}", result);
}

fn main() {
    std::thread::Builder::new()
        .stack_size(1 << 23)
        .spawn(_main)
        .unwrap()
        .join()
        .unwrap();
}


#![allow(dead_code)]
#![allow(unused_imports)]
#![allow(unused_macros)]

use std::char::*;
use std::cmp::*;
use std::collections::*;
use std::io::*;
use std::str::FromStr;

macro_rules! debug {($($a:expr),*) => {println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);}}
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 ) * } } ; }
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" ) } ; }

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);
impl<T: PartialEq> Eq for Total<T> {}
impl<T: PartialOrd> Ord for Total<T> { fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering { self.0.partial_cmp(&other.0).unwrap() }}

const MAX:usize = 5;
const MOD:i64 = 1e9 as i64 + 7;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

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

use std::f64;

fn min<T: PartialOrd>(a:T, b:T) -> T {
    if a < b { a }
    else { b }
}

use std::hash::Hash;
fn inc<T: Hash+Ord>(map:&mut BTreeMap<T,i64>, key:T) {
    let count = map.entry(key).or_insert(0);
    *count += 1;
}

fn mod_pow(x:i64, n:i64, m:i64) -> i64 {
    let mut x = x;
    let mut n = n;
    let mut res = 1i64;
    while n > 0 {
        if n & 1 > 0 {
            res = res * x % m;
        }
        x = x * x % m;
        n >>= 1;
    }
    res
}

fn main() {
    input!{n:usize};
    let mut ans = 0i64;
    for i in 1..n+1 {
       ans += 2i64.pow(i as u32);
    }
    println!("{}", ans);
}


fn main() {
    let mut input = String::new();
    use std::io::{self, prelude::*};
    io::stdin().read_to_string(&mut input).unwrap();

    let mut it = input.split_whitespace();

    let n: u32 = it.next().unwrap().parse().unwrap();
    let s: u32 = it.next().unwrap().parse().unwrap();

    let ans = (s - 1) / n + 1;

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


//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 {
    ($i:ident . $e:tt : $t:ty; $($a:ident),*) => {
        $( let $a: $t = $i.$e(); )*
    };
    ($i:ident . $e:tt; $($a:ident),*) => {
        $( let $a = $i.$e(); )*
    };
}
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!(input.i; a,b);
    println!("{}", (b + a - 1) / a);
}


use std::cmp;

use std::error::Error;

fn solve(mut n: i32, mut m: i32) -> i32 {
    n = cmp::min(n, m);

    let mut res: i32 = 0;
    while m > 0 {
        res += m / n;
        m %= n;
        n = cmp::min(n, m);
    }

    res
}

fn main() -> Result<(), Box<Error>> {
    let mut n_str = String::new();
    std::io::stdin().read_line(&mut n_str)?;

    let mut split = n_str.split_whitespace();

    let n: i32 = split.next().unwrap().parse().unwrap();
    let m: i32 = split.next().unwrap().parse().unwrap();

    println!("{}", solve(n, m));
    Ok(())
}


#[allow(unused_imports)]
use std::cmp;
#[allow(unused_imports)]
use std::collections::BTreeSet;
#[allow(unused_imports)]
use std::collections::HashMap;
#[allow(unused_imports)]
use std::collections::HashSet;
use std::fmt::Display;
use std::fs::File;
use std::io::Read;
#[allow(unused_imports)]
use std::mem;

#[allow(dead_code)]
fn pow_speedy_with_mod(mut p: i64, mut q: i64, m: i64) -> i64 {
    p %= m;
    let mut r = p;
    let mut ret: i64 = 1;
    while q > 0 {
        ret *= if q % 2 == 1 { r } else { 1 };
        r *= r;
        r %= m;
        q /= 2;
        ret %= m;
    }
    return ret;
}

#[allow(dead_code)]
fn comb(n: usize, k: usize, m: i64, frac: &[i64], frac_inv: &[i64]) -> i64 {
    let mut ret = 1i64;
    if n < k {
        return 0;
    }
    ret *= frac[n] * frac_inv[n - k];
    ret %= m;
    ret *= frac_inv[k];
    ret %= m;
    ret
}

#[allow(dead_code)]
fn show1dvec<T: Display>(v: &Vec<T>) {
    let n = v.len();
    for i in 0..n - 1 {
        print!("{} ", v[i]);
    }
    println!("{} ", v[n - 1]);
}

#[derive(Debug)]
struct Piece {
    mark: char,
    y: i32,
    x: i32,
}

fn main() {
    let inputstatus = 1;

    let mut buf = String::new();
    let filename = "inputrust.txt";

    if inputstatus == 0 {
        let mut f = File::open(filename).expect("file not found");
        f.read_to_string(&mut buf)
            .expect("something went wrong reading the file");
    } else {
        std::io::stdin().read_to_string(&mut buf).unwrap();
    }

    let mut iter = buf.split_whitespace();

    let n: usize = iter.next().unwrap().parse().unwrap();
    let m: usize = iter.next().unwrap().parse().unwrap();

    println!(
        "{}",
        if n > m * 2 {
            m
        } else if n * 2 < m {
            n
        } else {
            (n + m) / 3
        }
    );

    // let n = iter.next().unwrap().parse().unwrap();

    // println!("{}", n);
    // println!("{:?}", cum_num);
}


#[allow(unused_imports)]
use std::cmp::{max,min};
#[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 (mut n,mut m) = readln!(i64,i64);
  n = min(n,m*2);
  m = min(m,n*2);
  println!("{}",(n+m)/3);
}


use std::io;

// type Matrix = Vec<Vec<char>>;

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

fn read_line_vec() -> Vec<i64> {
    return read_line().split(' ')
        .map(|s| s.parse().unwrap())
        .collect();
}

fn read_line_pair() -> (i64, i64) {
    let vec = read_line_vec();
    return (vec[0], vec[1]);
}

fn main() {

    let (mut n, mut m) = read_line_pair();

    let mut count = 0;

    while n > 0 && m > 0 {
        if n > m {
            n -= 2;
            m -= 1;
        } else {
            n -= 1;
            m -= 2;
        }
        if n >= 0 && m >= 0 {
            count += 1;
        }

    }

    println!("{}", count);

    // println!("{:?} {:?}", l, r);

}


use std::io;

fn main() {
    let mut buffer = String::new();
    io::stdin().read_line(&mut buffer).expect("failed to read input");
    let mut buffer_iter = buffer.split_whitespace().map(|n| n.parse::<u32>().unwrap());
    let n = buffer_iter.next().unwrap();
    let m = buffer_iter.next().unwrap();

    if 2 * n <= m {
        println!("{}", n);
    } else if 2 * m <= n {
        println!("{}", m);
    } else {
        println!("{}", (n + m) / 3);
    }
}


struct Scan {
    buffer: std::collections::VecDeque<String>,
}

impl Scan {
    fn new() -> Scan {
        Scan {
            buffer: std::collections::VecDeque::new(),
        }
    }

    fn next<T: std::str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buffer.pop_front() {
                break token.parse::<T>().ok().unwrap();
            }
            let mut line = String::new();
            std::io::stdin().read_line(&mut line).expect("Fail to read");
            self.buffer = line.split_whitespace().map(String::from).collect();
        }
    }
}

fn _main() {
    let mut scan = Scan::new();
    let n: usize = scan.next();
    let m: usize = scan.next();
    let result = n.min(m).min((n + m) / 3);
    println!("{}", result);
}

fn main() {
    std::thread::Builder::new()
        .stack_size(1 << 23)
        .spawn(_main)
        .unwrap()
        .join()
        .unwrap();
}


//spnauti-rust
use std::io::*;
use std::str::*;
use std::fmt::Debug;
#[allow(unused_imports)] use std::cmp::Ordering::*;
#[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).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 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
}

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

    let e = input.i();
    let n = input.i();
    println!("{}", ((n + e) / 3).min(e).min(n));
}


#![allow(unused_imports)]
use std::io;
use std::io::prelude::*;
use std::io::BufReader;
use std::str::FromStr;

fn main() {
    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let nums: Vec<isize> = get_numbers(&input);
    let n = nums[0]; // experienced members
    let m = nums[1]; // newbies

    let mut teams = 0;
    let mut exp = n;
    let mut newb = m;
    while exp > 0 && newb > 0 {
        if exp > newb {
            exp -= 2;
            newb -= 1;
            teams += 1;
        } else {
            exp -= 1;
            newb -= 2;
            teams += 1;
        }
    }

    if exp == -1 || newb == -1 {
        teams -= 1;
    }

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

// get numbers from line seperated by spaces
fn get_numbers<T>(line: &str) -> Vec<T>
    where T: FromStr,
          <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    line.split_whitespace()
        .map(|chunk| chunk.parse::<T>().expect("failed to parse"))
        .collect()
}


macro_rules! parse_line {
    ($t: ty) => ({
        let mut a_str = String::new();
        std::io::stdin().read_line(&mut a_str).expect("read error");
        let a_str = a_str.trim();
        a_str.parse::<$t>().expect("parse error")
    });
    ($($t: ty),+) => ({
        let mut a_str = String::new();
        std::io::stdin().read_line(&mut a_str).expect("read error");
        let mut a_iter = a_str.split_whitespace();
        (
            $(
            a_iter.next().unwrap().parse::<$t>().expect("parse error"),
            )+
        )
    })
}

#[allow(unused_macros)]
macro_rules! parse_line_to_vec {
    ($t: ty) => {{
        let mut a_str = String::new();
        std::io::stdin().read_line(&mut a_str).expect("read error");
        (a_str
            .split_whitespace()
            .map(|x| x.parse::<$t>().unwrap())
            .collect::<Vec<$t>>())
    }};
}

use std::io::Write;

fn solve(writer: &mut std::io::BufWriter<std::io::Stdout>) {
    let n = parse_line!(u64);
    if n % 2 == 1 {
        writeln!(writer, "0").unwrap();
    }else{
        writeln!(writer, "{}", 1 << (n / 2)).unwrap();
    }
}

fn main() {
    let mut writer = std::io::BufWriter::new(std::io::stdout());
    let tests = 1; // parse_line!(usize);
    for _ in 0..tests {
        solve(&mut writer);
    }
}


use std::io::stdin;
use std::process::exit;

#[allow(dead_code)]
fn input_strs() -> Vec<char> {
    let mut st = String::new();
    match stdin().read_line(&mut st) {
        Ok(_) => st.chars().collect(),
        Err(_) => panic!("err"),
    }
}

#[allow(dead_code)]
fn input_ints() -> Vec<u64> {
    let mut st = String::new();
    match stdin().read_line(&mut st) {
        Ok(_) => st.split_whitespace().map(|s| s.parse().unwrap()).collect(),
        Err(_) => panic!("err"),
    }
}

fn solve() {
    let l = input_ints();
    let n = l[0] as u32;
    if n % 2 == 0 {
        println!("{}", (2 as u32).pow(n / 2));
    } else {
        println!("{}", 0);
    }
}

fn main() {
    solve();
    exit(0);
}


#[warn(unused_variables)]

fn main() {
    let n = input_::<u32>();
    println!("{}", if n % 2 == 0 {2u64.pow(n/2u32)} else {0})
}

fn input_str() -> String {
    let mut buff = String::new();
    std::io::stdin().read_line(&mut buff).expect("Err");
    buff
}

fn input_<T>() -> T
where
    T: std::str::FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    input_str().trim().parse::<T>().expect("Err pars")
}

fn input_vec<T>(sep: &str) -> Vec<T>
where
    T: std::str::FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    input_str().trim().split(sep).map(|c| c.parse::<T>().expect("Err pars")).collect()
}

fn input_vec_chars() -> Vec<char> {
    input_str().trim().chars().collect()
}


#[allow(unused_imports)]
use std::io::{BufWriter, stdin, stdout, Write};
use std::cmp::{min, max};
use std::collections::{VecDeque, HashMap, BTreeMap, HashSet, BTreeSet, BinaryHeap};

fn main() {
	let mut inp = my_input::default();
	let out = &mut BufWriter::new(stdout());
	let mut n = inp.scan::<usize>();
	if n % 2 == 1 {
		writeln!(out, "0");
		return;
	}
	n /= 2;
	let mut ans = 1 as i64;
	for i in 0..n {
		ans += ans;
	}
	writeln!(out, "{}", ans);
}

#[derive(Default)]
struct my_input {
	buffer: Vec<String>
}

impl my_input {
	fn scan<T: std::str::FromStr>(&mut self) -> T {
		loop {
			if let Some(token) = self.buffer.pop() {
				return token.parse().ok().expect("Parsing Error");
			}
			let mut s = String::new();
			stdin().read_line(&mut s).expect("Reading Error");
			self.buffer = s.split_whitespace().rev().map(String::from).collect();
		}
	}
}


fn main() -> Result<()> {
    let mut line = String::new();
    let _ = std::io::stdin().read_line(&mut line)?;
    let n: u32 = line.trim().parse()?;
    if (n & 1) == 1 {
        println!("0");
        return Ok(());
    }
    println!("{}", 2_usize.pow(n / 2));
    Ok(())
}

macro_rules! decl_error{
    ($($error:ident)*) => {
        #[derive(Debug)]
        pub enum Error {
            $($error($error),)*
        }

        $(
            impl From<$error> for Error {
                fn from(e: $error) -> Self {
                    Error::$error(e)
                }
            }
        )*

        pub type Result<T> = std::result::Result<T, Error>;
    }

}

mod error {
    use std::io::Error as StdError;
    use std::num::ParseIntError;
    decl_error!(StdError ParseIntError);
}

use error::Result;


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

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![],
        }
    }

    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();
        }
    }

    pub fn tokens<T: str::FromStr>(&mut self) -> Vec<T> {
        assert!(self.buffer.is_empty());
        let mut input = String::new();
        self.reader.read_line(&mut input).expect("Failed read");
        input
            .split_whitespace()
            .map(|x| x.parse().ok().expect("Failed parse"))
            .collect()
    }
}

fn solve<R: io::BufRead, W: io::Write>(scan: &mut Scanner<R>, out: &mut W) {
    let n: u32 = scan.token();
    let ans = if n % 2 == 0 { 2i64.pow(n / 2) } else { 0 };
    writeln!(out, "{}", ans).ok();
}

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


struct Scan {
    buffer: std::collections::VecDeque<String>,
}

impl Scan {
    fn new() -> Scan {
        Scan {
            buffer: std::collections::VecDeque::new(),
        }
    }

    fn next<T: std::str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buffer.pop_front() {
                break token.parse::<T>().ok().unwrap();
            }
            let mut line = String::new();
            std::io::stdin().read_line(&mut line).expect("Fail to read");
            self.buffer = line.split_whitespace().map(String::from).collect();
        }
    }
}

fn _main() {
    let mut scan = Scan::new();
    let n: u32 = scan.next();
    if n < 2 || n % 2 == 1 {
        println!("0");
    } else {
        println!("{}", 2u64.pow(n / 2));
    }
}

fn main() {
    std::thread::Builder::new()
        .stack_size(1 << 23)
        .spawn(_main)
        .unwrap()
        .join()
        .unwrap();
}


//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);

    let n = input.i();
    println!("{}", ((n + 1) % 2) * (1 << (n / 2)));

}


use std::io;

fn main() {
    let n = read_one::<usize>();
    let an = read::<usize>();
    let mut ans = 0;

    for i in 0..n {
        ans += an[i] * i * 4;
    }
    println!("{}", ans);
}

#[allow(dead_code)]
fn read<T>() -> Vec<T>
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.split_whitespace()
        .map(|s| s.trim().parse().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_one<T>() -> T
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().unwrap()
}


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

#[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 (a2,a3,a5,a6) = readln!(i32,i32,i32,i32);
    let a256 = min(a2,min(a5,a6));
    let a32 = min(a2-a256,a3);
    println!("{}",32*a32+256*a256);
}


use std::io::BufRead;

fn parse_many<N: std::str::FromStr>(string: &str) -> Result<Vec<N>, N::Err> {
    string.split_whitespace().map(str::parse).collect()
}

fn read_problem<R: BufRead>(br: R) -> Vec<u64> {
    let mut lines = br.lines();

    let vec = parse_many(&lines.next().unwrap().unwrap()).unwrap();
    assert!(vec.len() == 4);
    assert!(lines.next().is_none());
    vec
}

fn main() {
    let stdin = std::io::stdin();
    let vec = read_problem(stdin.lock());

    use std::cmp::min;
    let twofiftysix = min(vec[0], min(vec[2], vec[3]));
    let thirtytwo = min(vec[0]-twofiftysix, vec[1]);

    println!("{}", 256*twofiftysix + 32*thirtytwo);
}


struct Scan {
    buffer: std::collections::VecDeque<String>
}

impl Scan {
    fn new() -> Scan {
        Scan { buffer: std::collections::VecDeque::new() }
    }

    fn next<T: std::str::FromStr>(&mut self)-> T {
        loop {
            if let Some(token) = self.buffer.pop_front() {
                break token.parse::<T>().ok().unwrap();
            }
            let mut line = String::new();
            std::io::stdin().read_line(&mut line).expect("Fail to read");
            self.buffer = line.split_whitespace().map(String::from).collect();
        }
    }

    fn next_n<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.next::<T>()).collect()
    }

}

fn _main() {
    let mut scan = Scan::new();
    let a2: usize = scan.next();
    let a3: usize = scan.next();
    let a5: usize = scan.next();
    let a6: usize = scan.next();
    let n256: usize = a2.min(a5).min(a6);
    let n32: usize = a3.min(a2-n256);
    let result = n256*256 + n32*32;
    println!("{}", result);
}

fn main() {
    std::thread::Builder::new()
        .stack_size(1<<23).spawn(_main).unwrap().join().unwrap();
}


use std::cmp::min;

macro_rules! read_line {
    ($v:ident) => {
        let mut temp = String::new();
        std::io::stdin().read_line(&mut temp).unwrap();
        let $v = temp;
    };
    (var, $t:ty, $($v:ident), *) => {
        read_line!(input_line);
        let mut iter = parse_token!($t, input_line);
        $(
            let $v = iter.next().unwrap();
        )*
    };
    (vec, $t:ty, $v:ident) => {
        read_line!(input_line);
        let iter = parse_token!($t, input_line);
        let $v: Vec<$t> = iter.collect();
    };
    ($($v:ident; $t:ty), *) => {
        read_line!(input_line);
        let mut iter = input_line.split_whitespace();
        $(
            let $v: $t = iter.next().unwrap().parse().unwrap();
        )*
    };
}

macro_rules! parse_token {
    ($t:ty, $e:expr) => {
        $e.split_whitespace().map(|x| x.parse::<$t>().unwrap());
    };
}

fn main() {
    read_line!(k2;u32, k3;u32, k5;u32, k6;u32);
    let max_256 = min(min(k2, k5), k6);
    let k2_left = k2 - max_256;
    let max_32 = min(k2_left, k3);
    println!("{}", max_32 * 32 + max_256 * 256);
}


//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::str::*;
use std::fmt::Debug;
struct WordReader<'a> { it : SplitAsciiWhitespace<'a>, }
#[allow(dead_code)]
impl<'a> WordReader<'a> {
    fn new<T: std::io::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, std::io::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 buffer = String::new();
    let mut input = WordReader::from_stdin(&mut buffer);

    let (a,b,c,d) = (input.i(), input.i(), input.i(), input.i());
    let x = a.min(c.min(d));
    let y = b.min(a - x);
    println!("{}", x * 256 + y * 32);
}


// ---------- begin ModInt ----------
mod modint {

    #[allow(dead_code)]
    pub struct Mod;
    impl ConstantModulo for Mod {
        const MOD: u32 = 998_244_353;
    }

    #[allow(dead_code)]
    pub struct StaticMod;
    static mut STATIC_MOD: u32 = 0;
    impl Modulo for StaticMod {
        fn modulo() -> u32 {
            unsafe { STATIC_MOD }
        }
    }

    #[allow(dead_code)]
    impl StaticMod {
        pub fn set_modulo(p: u32) {
            unsafe {
                STATIC_MOD = p;
            }
        }
    }

    use std::marker::*;
    use std::ops::*;

    pub trait Modulo {
        fn modulo() -> u32;
    }

    pub trait ConstantModulo {
        const MOD: u32;
    }

    impl<T> Modulo for T
    where
        T: ConstantModulo,
    {
        fn modulo() -> u32 {
            T::MOD
        }
    }

    pub struct ModInt<T>(pub u32, PhantomData<T>);

    impl<T> Clone for ModInt<T> {
        fn clone(&self) -> Self {
            ModInt::new_unchecked(self.0)
        }
    }

    impl<T> Copy for ModInt<T> {}

    impl<T: Modulo> Add for ModInt<T> {
        type Output = ModInt<T>;
        fn add(self, rhs: Self) -> Self::Output {
            let mut d = self.0 + rhs.0;
            if d >= T::modulo() {
                d -= T::modulo();
            }
            ModInt::new_unchecked(d)
        }
    }

    impl<T: Modulo> AddAssign for ModInt<T> {
        fn add_assign(&mut self, rhs: Self) {
            *self = *self + rhs;
        }
    }

    impl<T: Modulo> Sub for ModInt<T> {
        type Output = ModInt<T>;
        fn sub(self, rhs: Self) -> Self::Output {
            let mut d = T::modulo() + self.0 - rhs.0;
            if d >= T::modulo() {
                d -= T::modulo();
            }
            ModInt::new_unchecked(d)
        }
    }

    impl<T: Modulo> SubAssign for ModInt<T> {
        fn sub_assign(&mut self, rhs: Self) {
            *self = *self - rhs;
        }
    }

    impl<T: Modulo> Mul for ModInt<T> {
        type Output = ModInt<T>;
        fn mul(self, rhs: Self) -> Self::Output {
            let v = self.0 as u64 * rhs.0 as u64 % T::modulo() as u64;
            ModInt::new_unchecked(v as u32)
        }
    }

    impl<T: Modulo> MulAssign for ModInt<T> {
        fn mul_assign(&mut self, rhs: Self) {
            *self = *self * rhs;
        }
    }

    impl<T: Modulo> Neg for ModInt<T> {
        type Output = ModInt<T>;
        fn neg(self) -> Self::Output {
            if self.0 == 0 {
                Self::zero()
            } else {
                Self::new_unchecked(T::modulo() - self.0)
            }
        }
    }

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

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

    impl<T: Modulo> From<usize> for ModInt<T> {
        fn from(val: usize) -> ModInt<T> {
            ModInt::new_unchecked((val % T::modulo() as usize) as u32)
        }
    }

    impl<T: Modulo> From<u64> for ModInt<T> {
        fn from(val: u64) -> ModInt<T> {
            ModInt::new_unchecked((val % T::modulo() as u64) as u32)
        }
    }

    impl<T: Modulo> From<i64> for ModInt<T> {
        fn from(val: i64) -> ModInt<T> {
            let m = T::modulo() as i64;
            ModInt::new((val % m + m) as u32)
        }
    }

    #[allow(dead_code)]
    impl<T> ModInt<T> {
        pub fn new_unchecked(d: u32) -> Self {
            ModInt(d, PhantomData)
        }
        pub fn zero() -> Self {
            ModInt::new_unchecked(0)
        }
        pub fn one() -> Self {
            ModInt::new_unchecked(1)
        }
        pub fn is_zero(&self) -> bool {
            self.0 == 0
        }
    }

    #[allow(dead_code)]
    impl<T: Modulo> ModInt<T> {
        pub fn new(d: u32) -> Self {
            ModInt::new_unchecked(d % T::modulo())
        }
        pub fn pow(&self, mut n: u64) -> Self {
            let mut t = Self::one();
            let mut s = *self;
            while n > 0 {
                if n & 1 == 1 {
                    t *= s;
                }
                s *= s;
                n >>= 1;
            }
            t
        }
        pub fn inv(&self) -> Self {
            assert!(self.0 != 0);
            self.pow(T::modulo() as u64 - 2)
        }
    }

    #[allow(dead_code)]
    pub fn mod_pow(r: u64, mut n: u64, m: u64) -> u64 {
        let mut t = 1 % m;
        let mut s = r % m;
        while n > 0 {
            if n & 1 == 1 {
                t = t * s % m;
            }
            s = s * s % m;
            n >>= 1;
        }
        t
    }
}
// ---------- end ModInt ----------
// ---------- begin Precalc ----------
mod precalc {
    use super::modint::*;
    #[allow(dead_code)]
    pub struct Precalc<T> {
        inv: Vec<ModInt<T>>,
        fact: Vec<ModInt<T>>,
        ifact: Vec<ModInt<T>>,
    }
    #[allow(dead_code)]
    impl<T: Modulo> Precalc<T> {
        pub fn new(n: usize) -> Precalc<T> {
            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) {
                fact[i] = fact[i - 1] * ModInt::new_unchecked(i as u32);
            }
            ifact[n] = fact[n].inv();
            if n > 0 {
                inv[n] = ifact[n] * fact[n - 1];
            }
            for i in (1..n).rev() {
                ifact[i] = ifact[i + 1] * ModInt::new_unchecked((i + 1) as u32);
                inv[i] = ifact[i] * fact[i - 1];
            }
            Precalc {
                inv: inv,
                fact: fact,
                ifact: ifact,
            }
        }
        pub fn inv(&self, n: usize) -> ModInt<T> {
            assert!(n > 0);
            self.inv[n]
        }
        pub fn fact(&self, n: usize) -> ModInt<T> {
            self.fact[n]
        }
        pub fn ifact(&self, n: usize) -> ModInt<T> {
            self.ifact[n]
        }
        pub fn perm(&self, n: usize, k: usize) -> ModInt<T> {
            if k > n {
                return ModInt::zero();
            }
            self.fact[n] * self.ifact[n - k]
        }
        pub fn comb(&self, n: usize, k: usize) -> ModInt<T> {
            if k > n {
                return ModInt::zero();
            }
            self.fact[n] * self.ifact[k] * self.ifact[n - k]
        }
    }
}
// ---------- end Precalc ----------
// ---------- 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 ----------

use modint::*;
type M = ModInt<Mod>;

fn run() {
    input! {
        n: usize,
    }
    let pc = precalc::Precalc::new(n);
    let mut ans = M::zero();
    for i in (0..n).step_by(2) {
        let k = i / 2;
        ans += pc.comb(n - i + k - 1, k);
    }
    ans *= M::new(2).inv().pow(n as u64);
    println!("{}", ans);
}

fn main() {
    run();
}


// codesnip-guard: minmax
#[macro_export]
macro_rules ! min { ($ e : expr) => { $ e } ; ($ e : expr , $ ($ es : expr) ,+) => { std :: cmp :: min ($ e , min ! ($ ($ es) ,+)) } ; }
#[macro_export]
macro_rules ! chmin { ($ dst : expr , $ ($ src : expr) ,+) => { { let x = std :: cmp :: min ($ dst , min ! ($ ($ src) ,+)) ; $ dst = x ; } } ; }
#[macro_export]
macro_rules ! max { ($ e : expr) => { $ e } ; ($ e : expr , $ ($ es : expr) ,+) => { std :: cmp :: max ($ e , max ! ($ ($ es) ,+)) } ; }
#[macro_export]
macro_rules ! chmax { ($ dst : expr , $ ($ src : expr) ,+) => { { let x = std :: cmp :: max ($ dst , max ! ($ ($ src) ,+)) ; $ dst = x ; } } ; }
// codesnip-guard: scanner
pub trait IterScan: Sized {
    type Output;
    fn scan<'a, I: Iterator<Item = &'a str>>(iter: &mut I) -> Option<Self::Output>;
}
pub trait MarkedIterScan: Sized {
    type Output;
    fn mscan<'a, I: Iterator<Item = &'a str>>(self, iter: &mut I) -> Option<Self::Output>;
}
#[derive(Clone, Debug)]
pub struct Scanner<'a> {
    iter: std::str::SplitAsciiWhitespace<'a>,
}
mod scanner_impls {
    use super::*;
    impl<'a> Scanner<'a> {
        #[inline]
        pub fn new(s: &'a str) -> Self {
            let iter = s.split_ascii_whitespace();
            Self { iter }
        }
        #[inline]
        pub fn scan<T: IterScan>(&mut self) -> <T as IterScan>::Output {
            <T as IterScan>::scan(&mut self.iter).expect("scan error")
        }
        #[inline]
        pub fn mscan<T: MarkedIterScan>(&mut self, marker: T) -> <T as MarkedIterScan>::Output {
            marker.mscan(&mut self.iter).expect("scan error")
        }
        #[inline]
        pub fn scan_vec<T: IterScan>(&mut self, size: usize) -> Vec<<T as IterScan>::Output> {
            (0..size)
                .map(|_| <T as IterScan>::scan(&mut self.iter).expect("scan error"))
                .collect()
        }
        #[inline]
        pub fn iter<'b, T: IterScan>(&'b mut self) -> ScannerIter<'a, 'b, T> {
            ScannerIter {
                inner: self,
                _marker: std::marker::PhantomData,
            }
        }
    }
    macro_rules ! iter_scan_impls { ($ ($ t : ty) *) => { $ (impl IterScan for $ t { type Output = Self ; # [inline] fn scan <'a , I : Iterator < Item = &'a str >> (iter : & mut I) -> Option < Self > { iter . next () ?. parse ::<$ t > () . ok () } }) * } ; }
    iter_scan_impls ! (char u8 u16 u32 u64 usize i8 i16 i32 i64 isize f32 f64 u128 i128 String);
    macro_rules ! iter_scan_tuple_impl { ($ ($ T : ident) *) => { impl <$ ($ T : IterScan) ,*> IterScan for ($ ($ T ,) *) { type Output = ($ (<$ T as IterScan >:: Output ,) *) ; # [inline] fn scan <'a , It : Iterator < Item = &'a str >> (_iter : & mut It) -> Option < Self :: Output > { Some (($ (<$ T as IterScan >:: scan (_iter) ?,) *)) } } } ; }
    iter_scan_tuple_impl!();
    iter_scan_tuple_impl!(A);
    iter_scan_tuple_impl ! (A B);
    iter_scan_tuple_impl ! (A B C);
    iter_scan_tuple_impl ! (A B C D);
    iter_scan_tuple_impl ! (A B C D E);
    iter_scan_tuple_impl ! (A B C D E F);
    iter_scan_tuple_impl ! (A B C D E F G);
    iter_scan_tuple_impl ! (A B C D E F G H);
    iter_scan_tuple_impl ! (A B C D E F G H I);
    iter_scan_tuple_impl ! (A B C D E F G H I J);
    iter_scan_tuple_impl ! (A B C D E F G H I J K);
    pub struct ScannerIter<'a, 'b, T> {
        inner: &'b mut Scanner<'a>,
        _marker: std::marker::PhantomData<fn() -> T>,
    }
    impl<'a, 'b, T: IterScan> Iterator for ScannerIter<'a, 'b, T> {
        type Item = <T as IterScan>::Output;
        #[inline]
        fn next(&mut self) -> Option<Self::Item> {
            <T as IterScan>::scan(&mut self.inner.iter)
        }
    }
}
pub mod marker {
    use super::*;
    use std::{iter::FromIterator, marker::PhantomData};
    #[derive(Debug, Copy, Clone)]
    pub struct Usize1;
    impl IterScan for Usize1 {
        type Output = usize;
        #[inline]
        fn scan<'a, I: Iterator<Item = &'a str>>(iter: &mut I) -> Option<Self::Output> {
            Some(<usize as IterScan>::scan(iter)?.checked_sub(1)?)
        }
    }
    #[derive(Debug, Copy, Clone)]
    pub struct Chars;
    impl IterScan for Chars {
        type Output = Vec<char>;
        #[inline]
        fn scan<'a, I: Iterator<Item = &'a str>>(iter: &mut I) -> Option<Self::Output> {
            Some(iter.next()?.chars().collect())
        }
    }
    #[derive(Debug, Copy, Clone)]
    pub struct CharsWithBase(pub char);
    impl MarkedIterScan for CharsWithBase {
        type Output = Vec<usize>;
        #[inline]
        fn mscan<'a, I: Iterator<Item = &'a str>>(self, iter: &mut I) -> Option<Self::Output> {
            Some(
                iter.next()?
                    .chars()
                    .map(|c| (c as u8 - self.0 as u8) as usize)
                    .collect(),
            )
        }
    }
    #[derive(Debug, Copy, Clone)]
    pub struct Collect<T: IterScan, B: FromIterator<<T as IterScan>::Output>> {
        size: usize,
        _marker: PhantomData<fn() -> (T, B)>,
    }
    impl<T: IterScan, B: FromIterator<<T as IterScan>::Output>> Collect<T, B> {
        pub fn new(size: usize) -> Self {
            Self {
                size,
                _marker: PhantomData,
            }
        }
    }
    impl<T: IterScan, B: FromIterator<<T as IterScan>::Output>> MarkedIterScan for Collect<T, B> {
        type Output = B;
        #[inline]
        fn mscan<'a, I: Iterator<Item = &'a str>>(self, iter: &mut I) -> Option<Self::Output> {
            Some(
                (0..self.size)
                    .map(|_| <T as IterScan>::scan(iter).expect("scan error"))
                    .collect::<B>(),
            )
        }
    }
}
// codesnip-guard: zero_one
pub trait Zero: PartialEq + Sized {
    fn zero() -> Self;
    #[inline]
    fn is_zero(&self) -> bool {
        self == &Self::zero()
    }
}
pub trait One: PartialEq + Sized {
    fn one() -> Self;
    #[inline]
    fn is_one(&self) -> bool {
        self == &Self::one()
    }
}
macro_rules ! zero_one_impls { ($ ({ $ Trait : ident $ method : ident $ ($ t : ty) *, $ e : expr }) *) => { $ ($ (impl $ Trait for $ t { # [inline] fn $ method () -> Self { $ e } }) *) * } ; }
zero_one_impls ! ({ Zero zero u8 u16 u32 u64 usize i8 i16 i32 i64 isize u128 i128 , 0 } { Zero zero f32 f64 , 0. } { One one u8 u16 u32 u64 usize i8 i16 i32 i64 isize u128 i128 , 1 } { One one f32 f64 , 1. });
// codesnip-guard: main
fn main() {
    #![allow(unused_imports, unused_macros)]
    use std::io::{stdin, stdout, BufWriter, Read as _, Write as _};
    let mut _in_buf = Vec::new();
    stdin().read_to_end(&mut _in_buf).expect("io error");
    let _in_buf = unsafe { String::from_utf8_unchecked(_in_buf) };
    let mut scanner = Scanner::new(&_in_buf);
    macro_rules ! scan { () => { scan ! (usize) } ; (($ ($ t : tt) ,*)) => { ($ (scan ! ($ t)) ,*) } ; ([$ t : tt ; $ len : expr]) => { (0 ..$ len) . map (| _ | scan ! ($ t)) . collect ::< Vec < _ >> () } ; ([$ t : ty ; $ len : expr]) => { scanner . scan_vec ::<$ t > ($ len) } ; ([$ t : ty]) => { scanner . iter ::<$ t > () } ; ({ $ e : expr }) => { scanner . mscan ($ e) } ; ($ t : ty) => { scanner . scan ::<$ t > () } ; }
    let _out = stdout();
    let mut _out = BufWriter::new(_out.lock());
    macro_rules ! print { ($ ($ arg : tt) *) => (:: std :: write ! (_out , $ ($ arg) *) . expect ("io error")) }
    macro_rules ! println { ($ ($ arg : tt) *) => (:: std :: writeln ! (_out , $ ($ arg) *) . expect ("io error")) }
    macro_rules! echo {
        ($ iter : expr) => {
            echo!($iter, '\n')
        };
        ($ iter : expr , $ sep : expr) => {
            let mut iter = $iter.into_iter();
            if let Some(item) = iter.next() {
                print!("{}", item);
            }
            for item in iter {
                print!("{}{}", $sep, item);
            }
            println!();
        };
    }
    let n = scan!();
    let mut dp = vec![M::zero(); n + 1];
    let mut acc1 = vec![M::zero(); n + 1];
    let mut acc2 = vec![M::zero(); n + 1];
    dp[0] = M::one();
    acc1[0] = M::one();
    for i in 0..n {
        dp[i + 1] = if i % 2 == 0 { acc1[i] } else { acc2[i] };
        acc1[i + 1] = acc1[i];
        acc2[i + 1] = acc2[i];
        if i % 2 == 0 {
            acc2[i + 1] += dp[i + 1];
        } else {
            acc1[i + 1] += dp[i + 1];
        }
    }
    println!("{}", dp[n] / M::new_unchecked(2).pow(n));
}
type M = mint_basic::MInt998244353;
// codesnip-guard: MIntBase
#[repr(transparent)]
pub struct MInt<M>
where
    M: MIntBase,
{
    x: M::Inner,
    _marker: std::marker::PhantomData<fn() -> M>,
}
pub trait MIntBase {
    type Inner: Sized + Copy + Eq + std::fmt::Debug + std::hash::Hash;
    fn get_mod() -> Self::Inner;
    fn mod_zero() -> Self::Inner;
    fn mod_one() -> Self::Inner;
    fn mod_add(x: Self::Inner, y: Self::Inner) -> Self::Inner;
    fn mod_sub(x: Self::Inner, y: Self::Inner) -> Self::Inner;
    fn mod_mul(x: Self::Inner, y: Self::Inner) -> Self::Inner;
    fn mod_div(x: Self::Inner, y: Self::Inner) -> Self::Inner;
    fn mod_neg(x: Self::Inner) -> Self::Inner;
    fn mod_inv(x: Self::Inner) -> Self::Inner;
    fn mod_pow(x: Self::Inner, y: usize) -> Self::Inner {
        let (mut x, mut y, mut z) = (x, y, Self::mod_one());
        while y > 0 {
            if y & 1 == 1 {
                z = Self::mod_mul(z, x);
            }
            x = Self::mod_mul(x, x);
            y >>= 1;
        }
        z
    }
}
pub trait MIntConvert<T = <Self as MIntBase>::Inner>: MIntBase {
    fn from(x: T) -> <Self as MIntBase>::Inner;
    fn into(x: <Self as MIntBase>::Inner) -> T;
    fn mod_into() -> T;
}
mod mint_base {
    use super::*;
    use std::{
        fmt::{self, Debug, Display},
        hash::{Hash, Hasher},
        iter::{Product, Sum},
        marker::PhantomData,
        ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign},
        str::FromStr,
    };
    impl<M> MInt<M>
    where
        M: MIntConvert,
    {
        #[inline]
        pub fn new(x: M::Inner) -> Self {
            Self::new_unchecked(<M as MIntConvert<M::Inner>>::from(x))
        }
        #[inline]
        pub fn inner(self) -> M::Inner {
            <M as MIntConvert<M::Inner>>::into(self.x)
        }
    }
    impl<M> MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        pub fn new_unchecked(x: M::Inner) -> Self {
            Self {
                x,
                _marker: PhantomData,
            }
        }
        #[inline]
        pub fn get_mod() -> M::Inner {
            M::get_mod()
        }
        #[inline]
        pub fn pow(self, y: usize) -> Self {
            Self::new_unchecked(M::mod_pow(self.x, y))
        }
        #[inline]
        pub fn inv(self) -> Self {
            Self::new_unchecked(M::mod_inv(self.x))
        }
    }
    impl<M> Clone for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn clone(&self) -> Self {
            Self {
                x: Clone::clone(&self.x),
                _marker: PhantomData,
            }
        }
    }
    impl<M> Copy for MInt<M> where M: MIntBase {}
    impl<M> Debug for MInt<M>
    where
        M: MIntBase,
    {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            Debug::fmt(&self.x, f)
        }
    }
    impl<M> Default for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn default() -> Self {
            <Self as Zero>::zero()
        }
    }
    impl<M> PartialEq for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn eq(&self, other: &Self) -> bool {
            PartialEq::eq(&self.x, &other.x)
        }
    }
    impl<M> Eq for MInt<M> where M: MIntBase {}
    impl<M> Hash for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn hash<H: Hasher>(&self, state: &mut H) {
            Hash::hash(&self.x, state)
        }
    }
    macro_rules ! impl_mint_from { ($ ($ t : ty) ,*) => { $ (impl < M > From <$ t > for MInt < M > where M : MIntConvert <$ t >, { # [inline] fn from (x : $ t) -> Self { Self :: new_unchecked (< M as MIntConvert <$ t >>:: from (x)) } } impl < M > From < MInt < M >> for $ t where M : MIntConvert <$ t >, { # [inline] fn from (x : MInt < M >) -> $ t { < M as MIntConvert <$ t >>:: into (x . x) } }) * } ; }
    impl_mint_from!(u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize);
    impl<M> Zero for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn zero() -> Self {
            Self::new_unchecked(M::mod_zero())
        }
    }
    impl<M> One for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn one() -> Self {
            Self::new_unchecked(M::mod_one())
        }
    }
    impl<M> Add for MInt<M>
    where
        M: MIntBase,
    {
        type Output = Self;
        #[inline]
        fn add(self, rhs: Self) -> Self::Output {
            Self::new_unchecked(M::mod_add(self.x, rhs.x))
        }
    }
    impl<M> Sub for MInt<M>
    where
        M: MIntBase,
    {
        type Output = Self;
        #[inline]
        fn sub(self, rhs: Self) -> Self::Output {
            Self::new_unchecked(M::mod_sub(self.x, rhs.x))
        }
    }
    impl<M> Mul for MInt<M>
    where
        M: MIntBase,
    {
        type Output = Self;
        #[inline]
        fn mul(self, rhs: Self) -> Self::Output {
            Self::new_unchecked(M::mod_mul(self.x, rhs.x))
        }
    }
    impl<M> Div for MInt<M>
    where
        M: MIntBase,
    {
        type Output = Self;
        #[inline]
        fn div(self, rhs: Self) -> Self::Output {
            Self::new_unchecked(M::mod_div(self.x, rhs.x))
        }
    }
    impl<M> Neg for MInt<M>
    where
        M: MIntBase,
    {
        type Output = Self;
        #[inline]
        fn neg(self) -> Self::Output {
            Self::new_unchecked(M::mod_neg(self.x))
        }
    }
    impl<M> Sum for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn sum<I: Iterator<Item = Self>>(iter: I) -> Self {
            iter.fold(<Self as Zero>::zero(), Add::add)
        }
    }
    impl<M> Product for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn product<I: Iterator<Item = Self>>(iter: I) -> Self {
            iter.fold(<Self as One>::one(), Mul::mul)
        }
    }
    impl<'a, M: 'a> Sum<&'a MInt<M>> for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self {
            iter.fold(<Self as Zero>::zero(), Add::add)
        }
    }
    impl<'a, M: 'a> Product<&'a MInt<M>> for MInt<M>
    where
        M: MIntBase,
    {
        #[inline]
        fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self {
            iter.fold(<Self as One>::one(), Mul::mul)
        }
    }
    impl<M> Display for MInt<M>
    where
        M: MIntConvert,
        M::Inner: Display,
    {
        fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> Result<(), fmt::Error> {
            write!(f, "{}", self.inner())
        }
    }
    impl<M> FromStr for MInt<M>
    where
        M: MIntConvert,
        M::Inner: FromStr,
    {
        type Err = <M::Inner as FromStr>::Err;
        #[inline]
        fn from_str(s: &str) -> Result<Self, Self::Err> {
            s.parse::<M::Inner>().map(Self::new)
        }
    }
    impl<M> IterScan for MInt<M>
    where
        M: MIntConvert,
        M::Inner: FromStr,
    {
        type Output = Self;
        #[inline]
        fn scan<'a, I: Iterator<Item = &'a str>>(iter: &mut I) -> Option<Self::Output> {
            iter.next()?.parse::<MInt<M>>().ok()
        }
    }
    macro_rules! impl_mint_ref_binop {
        ($ imp : ident , $ method : ident , $ t : ty) => {
            impl<M> $imp<$t> for &$t
            where
                M: MIntBase,
            {
                type Output = <$t as $imp<$t>>::Output;
                #[inline]
                fn $method(self, other: $t) -> <$t as $imp<$t>>::Output {
                    $imp::$method(*self, other)
                }
            }
            impl<M> $imp<&$t> for $t
            where
                M: MIntBase,
            {
                type Output = <$t as $imp<$t>>::Output;
                #[inline]
                fn $method(self, other: &$t) -> <$t as $imp<$t>>::Output {
                    $imp::$method(self, *other)
                }
            }
            impl<M> $imp<&$t> for &$t
            where
                M: MIntBase,
            {
                type Output = <$t as $imp<$t>>::Output;
                #[inline]
                fn $method(self, other: &$t) -> <$t as $imp<$t>>::Output {
                    $imp::$method(*self, *other)
                }
            }
        };
    }
    impl_mint_ref_binop!(Add, add, MInt<M>);
    impl_mint_ref_binop!(Sub, sub, MInt<M>);
    impl_mint_ref_binop!(Mul, mul, MInt<M>);
    impl_mint_ref_binop!(Div, div, MInt<M>);
    macro_rules! impl_mint_ref_unop {
        ($ imp : ident , $ method : ident , $ t : ty) => {
            impl<M> $imp for &$t
            where
                M: MIntBase,
            {
                type Output = <$t as $imp>::Output;
                #[inline]
                fn $method(self) -> <$t as $imp>::Output {
                    $imp::$method(*self)
                }
            }
        };
    }
    impl_mint_ref_unop!(Neg, neg, MInt<M>);
    macro_rules! impl_mint_ref_op_assign {
        ($ imp : ident , $ method : ident , $ t : ty , $ fromimp : ident , $ frommethod : ident) => {
            impl<M> $imp<$t> for $t
            where
                M: MIntBase,
            {
                #[inline]
                fn $method(&mut self, rhs: $t) {
                    *self = $fromimp::$frommethod(*self, rhs);
                }
            }
            impl<M> $imp<&$t> for $t
            where
                M: MIntBase,
            {
                #[inline]
                fn $method(&mut self, other: &$t) {
                    $imp::$method(self, *other);
                }
            }
        };
    }
    impl_mint_ref_op_assign!(AddAssign, add_assign, MInt<M>, Add, add);
    impl_mint_ref_op_assign!(SubAssign, sub_assign, MInt<M>, Sub, sub);
    impl_mint_ref_op_assign!(MulAssign, mul_assign, MInt<M>, Mul, mul);
    impl_mint_ref_op_assign!(DivAssign, div_assign, MInt<M>, Div, div);
}
// codesnip-guard: MInt
pub mod mint_basic {
    use super::*;
    #[macro_export]
    macro_rules ! define_basic_mintbase { ($ name : ident , $ m : expr , $ basety : ty , $ upperty : ty , [$ ($ unsigned : ty) ,*] , [$ ($ signed : ty) ,*]) => { pub struct $ name ; impl MIntBase for $ name { type Inner = $ basety ; # [inline] fn get_mod () -> Self :: Inner { $ m } # [inline] fn mod_zero () -> Self :: Inner { 0 } # [inline] fn mod_one () -> Self :: Inner { 1 } # [inline] fn mod_add (x : Self :: Inner , y : Self :: Inner) -> Self :: Inner { let z = x + y ; let m = Self :: get_mod () ; if z >= m { z - m } else { z } } # [inline] fn mod_sub (x : Self :: Inner , y : Self :: Inner) -> Self :: Inner { if x < y { x + Self :: get_mod () - y } else { x - y } } # [inline] fn mod_mul (x : Self :: Inner , y : Self :: Inner) -> Self :: Inner { (x as $ upperty * y as $ upperty % Self :: get_mod () as $ upperty) as $ basety } # [inline] fn mod_div (x : Self :: Inner , y : Self :: Inner) -> Self :: Inner { Self :: mod_mul (x , Self :: mod_inv (y)) } # [inline] fn mod_neg (x : Self :: Inner) -> Self :: Inner { if x == 0 { 0 } else { Self :: get_mod () - x } } fn mod_inv (x : Self :: Inner) -> Self :: Inner { let mut a = x ; let (mut b , mut u , mut s) = (Self :: get_mod () , 1 , 0) ; let k = a . trailing_zeros () ; a >>= k ; for _ in 0 .. k { if u & 1 == 1 { u += Self :: get_mod () ; } u /= 2 ; } while a != b { if b < a { std :: mem :: swap (& mut a , & mut b) ; std :: mem :: swap (& mut u , & mut s) ; } b -= a ; if s < u { s += Self :: get_mod () ; } s -= u ; let k = b . trailing_zeros () ; b >>= k ; for _ in 0 .. k { if s & 1 == 1 { s += Self :: get_mod () ; } s /= 2 ; } } s } } $ (impl MIntConvert <$ unsigned > for $ name { # [inline] fn from (x : $ unsigned) -> Self :: Inner { (x % < Self as MIntBase >:: get_mod () as $ unsigned) as $ basety } # [inline] fn into (x : Self :: Inner) -> $ unsigned { x as $ unsigned } # [inline] fn mod_into () -> $ unsigned { < Self as MIntBase >:: get_mod () as $ unsigned } }) * $ (impl MIntConvert <$ signed > for $ name { # [inline] fn from (x : $ signed) -> Self :: Inner { let x = x % < Self as MIntBase >:: get_mod () as $ signed ; if x < 0 { (x + < Self as MIntBase >:: get_mod () as $ signed) as $ basety } else { x as $ basety } } # [inline] fn into (x : Self :: Inner) -> $ signed { x as $ signed } # [inline] fn mod_into () -> $ signed { < Self as MIntBase >:: get_mod () as $ signed } }) * } ; }
    #[macro_export]
    macro_rules ! define_basic_mint32 { ($ ([$ name : ident , $ m : expr , $ mint_name : ident]) ,*) => { $ (crate :: define_basic_mintbase ! ($ name , $ m , u32 , u64 , [u32 , u64 , u128 , usize] , [i32 , i64 , i128 , isize]) ; pub type $ mint_name = MInt <$ name >;) * } ; }
    define_basic_mint32!(
        [Modulo998244353, 998_244_353, MInt998244353],
        [Modulo1000000007, 1_000_000_007, MInt1000000007],
        [Modulo1000000009, 1_000_000_009, MInt1000000009],
        [DynModuloU32, unsafe { DYN_MODULUS_U32 }, DynMIntU32]
    );
    static mut DYN_MODULUS_U32: u32 = 1_000_000_007;
    impl DynModuloU32 {
        pub fn set_mod(m: u32) {
            unsafe {
                DYN_MODULUS_U32 = m;
            }
        }
    }
    static mut DYN_MODULUS_U64: u64 = 1_000_000_007;
    define_basic_mintbase!(
        DynModuloU64,
        unsafe { DYN_MODULUS_U64 },
        u64,
        u128,
        [u64, u128, usize],
        [i64, i128, isize]
    );
    impl DynModuloU64 {
        pub fn set_mod(m: u64) {
            unsafe {
                DYN_MODULUS_U64 = m;
            }
        }
    }
    pub type DynMIntU64 = MInt<DynModuloU64>;
    pub struct Modulo2;
    impl MIntBase for Modulo2 {
        type Inner = u32;
        #[inline]
        fn get_mod() -> Self::Inner {
            2
        }
        #[inline]
        fn mod_zero() -> Self::Inner {
            0
        }
        #[inline]
        fn mod_one() -> Self::Inner {
            1
        }
        #[inline]
        fn mod_add(x: Self::Inner, y: Self::Inner) -> Self::Inner {
            x ^ y
        }
        #[inline]
        fn mod_sub(x: Self::Inner, y: Self::Inner) -> Self::Inner {
            x ^ y
        }
        #[inline]
        fn mod_mul(x: Self::Inner, y: Self::Inner) -> Self::Inner {
            x | y
        }
        #[inline]
        fn mod_div(x: Self::Inner, y: Self::Inner) -> Self::Inner {
            assert_ne!(y, 0);
            x
        }
        #[inline]
        fn mod_neg(x: Self::Inner) -> Self::Inner {
            x
        }
        #[inline]
        fn mod_inv(x: Self::Inner) -> Self::Inner {
            assert_ne!(x, 0);
            x
        }
        #[inline]
        fn mod_pow(x: Self::Inner, y: usize) -> Self::Inner {
            if y == 0 {
                1
            } else {
                x
            }
        }
    }
    macro_rules ! impl_to_mint_base_for_modulo2 { ($ name : ident , $ basety : ty , [$ ($ t : ty) ,*]) => { $ (impl MIntConvert <$ t > for $ name { # [inline] fn from (x : $ t) -> Self :: Inner { (x & 1) as $ basety } # [inline] fn into (x : Self :: Inner) -> $ t { x as $ t } # [inline] fn mod_into () -> $ t { 1 } }) * } ; }
    impl_to_mint_base_for_modulo2!(
        Modulo2,
        u32,
        [u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize]
    );
    pub type MInt2 = MInt<Modulo2>;
}


/*
    date   : 2020 / 5 / 5
    author : quickn (quickn.ga)
    email  : quickwshell@gmail.com
*/

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

mod scanner {
    use std::{io, str};
    /* https://github.com/EbTech/rust-algorithms */

    /// 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::new(),
                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())
                }
            }
        }
    }
}

const MOD: i64 = 998244353;

fn pow_mod(a: i64, x: i64) -> i64 {
    let (mut r, mut a_t, mut x_t) = (1, a, x);
    while x_t != 0 {
        if (x_t & 1) == 1 {
            r *= a_t;
            r %= MOD;
        }
        a_t *= a_t;
        a_t %= MOD;
        x_t >>= 1;
    }
    r
}

fn mod_inv(a: i64) -> i64 {
    pow_mod(a, MOD-2)
}

fn main() {
    let (stdin, stdout) = (io::stdin(), io::stdout());
    let (mut scan, mut sout) = (
        scanner::UnsafeScanner::new(stdin.lock()),
        BufWriter::new(stdout.lock()),
    );
    let n: i64 = scan.token();
    let mut dp: Vec<i64> = vec![0;(n+10) as usize];
    let mut inv2 = mod_inv(2);
    dp[0] = 1;
    dp[1] = inv2;
    dp[2] = (dp[1]*inv2)%MOD;
    for i in 3..=(n as usize) {
        dp[i] = (((dp[i-1]*inv2)%MOD) + ((dp[i-2]*pow_mod(inv2, 2))%MOD))%MOD;
    }
    writeln!(sout, "{}", dp[n as usize]).ok();
}


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

fn input(stdin: &mut StdinLock) -> String {
    let mut input = String::new();
    stdin.read_line(&mut input).ok();
    input
}

macro_rules! read {
    ($stdin:expr, [$t:tt; $n:expr]) => {
        (0..$n).map(|_| read!($stdin, $t)).collect::<Vec<_>>()
    };
    ($stdin:expr, [$t:tt]) => {
        input($stdin)
            .split_whitespace()
            .map(|x| parse!(x, $t))
            .collect::<Vec<_>>()
    };
    ($stdin:expr, ($($t:tt),*)) => {
        {
            let input = input($stdin);
            let mut iter = input.split_whitespace();
            ( $( parse!(iter.next().unwrap(), $t) ),* )
        }
    };
    ($stdin:expr, $t:tt) => {
        parse!(input($stdin).trim(), $t)
    };
}

macro_rules! parse {
    ($s:expr, chars) => {
        $s.chars().collect::<Vec<_>>()
    };
    ($s:expr, usize1) => {
        parse!($s, usize) - 1
    };
    ($s:expr, $t:ty) => {
        $s.parse::<$t>().unwrap()
    }
}

trait ProconWrite {
    fn writeln<T: std::fmt::Display>(&mut self, x: T);
    fn writeln_iter<I: Iterator>(&mut self, iter: I)
    where
        I::Item: std::fmt::Display
    {
        self.writeln(
            iter.map(|x| x.to_string()).collect::<Vec<_>>().join(" ")
        );
    }
}

impl ProconWrite for BufWriter<StdoutLock<'_>> {
    fn writeln<T: std::fmt::Display>(&mut self, x: T) {
        writeln!(self, "{}", x).ok();
    }
}

#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd)]
struct ModInt(i64);

impl ModInt {
    const MOD: i64 = 998_244_353;

    fn new(x: i64) -> ModInt {
        Self(x % Self::MOD)
    }
}

impl std::ops::Add for ModInt {
    type Output = Self;

    fn add(self, other: Self) -> Self {
        let x = self.0 + other.0;
        if x < Self::MOD { Self(x) } else { Self(x - Self::MOD) }
    }
}

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

impl std::ops::Sub for ModInt {
    type Output = Self;

    fn sub(self, other: Self) -> Self {
        if self.0 < other.0 {
            Self(self.0 + Self::MOD - other.0)
        } else {
            Self(self.0 - other.0)
        }
    }
}

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

impl std::ops::Mul for ModInt {
    type Output = Self;

    fn mul(self, other: Self) -> Self {
        Self::new(self.0 * other.0)
    }
}

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

impl std::fmt::Display for ModInt {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> 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 x = s.parse()?;
        Ok(ModInt(x))
    }
}

impl From<usize> for ModInt {
    fn from(x: usize) -> Self {
        Self(x as i64)
    }
}

impl ModInt {
    fn pow(mut self, mut n: i64) -> Self {
        assert!(n >= 0);
        let mut res = Self(1);
        while n != 0 {
            if n & 1 != 0 {
                res *= self;
            }
            self *= self;
            n >>= 1;
        }
        res
    }

    fn inv(self) -> Self {
        self.pow(Self::MOD - 2)
    }
}

fn solve(stdin: &mut StdinLock, writer: &mut BufWriter<StdoutLock>) {
    let n = read!(stdin, usize);

    let mut sum = [ModInt(0), ModInt(0)];
    let mut a = vec![ModInt(0); n + 1];
    a[0] = ModInt(1);
    for i in 1..=n {
        a[i] = a[i] + a[i - 1];
        if i >= 3 {
            sum[i % 2] += a[i - 3];
            a[i] += sum[i % 2];
        }
    }

    writer.writeln(a[n] * ModInt(2).pow(n as i64).inv());
}

fn main() {
    let stdin = std::io::stdin();
    let mut stdin = stdin.lock();

    let stdout = std::io::stdout();
    let mut writer = BufWriter::new(stdout.lock());

    solve(&mut stdin, &mut writer);
}