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

use std::fmt::Debug;
use std::str::FromStr;

fn read_stdin() -> String {
    let mut s = String::new();
    std::io::stdin()
        .read_line(&mut s)
        .expect("cannot read stdin");
    s.trim().to_string()
}

fn read<T>() -> T
where
    T: FromStr,
    <T as FromStr>::Err: Debug,
{
    read_stdin().parse::<T>().unwrap()
}

fn read_usize() -> usize {
    read::<usize>()
}

fn read_2<A, B>() -> (A, B)
where
    A: FromStr,
    <A as FromStr>::Err: Debug,
    B: FromStr,
    <B as FromStr>::Err: Debug,
{
    let s = read_stdin();
    let mut s = s.split_whitespace();
    let a = s.next().unwrap().parse::<A>().unwrap();
    let b = s.next().unwrap().parse::<B>().unwrap();
    (a, b)
}

fn read_3<A, B, C>() -> (A, B, C)
where
    A: FromStr,
    <A as FromStr>::Err: Debug,
    B: FromStr,
    <B as FromStr>::Err: Debug,
    C: FromStr,
    <C as FromStr>::Err: Debug,
{
    let s = read_stdin();
    let mut s = s.split_whitespace();
    let a = s.next().unwrap().parse::<A>().unwrap();
    let b = s.next().unwrap().parse::<B>().unwrap();
    let c = s.next().unwrap().parse::<C>().unwrap();
    (a, b, c)
}

fn read_4<A, B, C, D>() -> (A, B, C, D)
where
    A: FromStr,
    <A as FromStr>::Err: Debug,
    B: FromStr,
    <B as FromStr>::Err: Debug,
    C: FromStr,
    <C as FromStr>::Err: Debug,
    D: FromStr,
    <D as FromStr>::Err: Debug,
{
    let s = read_stdin();
    let mut s = s.split_whitespace();
    let a = s.next().unwrap().parse::<A>().unwrap();
    let b = s.next().unwrap().parse::<B>().unwrap();
    let c = s.next().unwrap().parse::<C>().unwrap();
    let d = s.next().unwrap().parse::<D>().unwrap();
    (a, b, c, d)
}

fn read_multiple<T: FromStr>() -> Vec<T>
where
    <T as FromStr>::Err: Debug,
{
    read_stdin()
        .split_whitespace()
        .map(|x| x.parse::<T>().expect("cannot parse stdin"))
        .collect()
}

/// NOTE: sort iter beforehand if required
fn count<T>(iter: &mut impl Iterator<Item = T>) -> Vec<(T, usize)>
where
    T: std::cmp::Ord,
{
    let iter = iter.collect::<Vec<_>>();
    //iter.sort();
    let (mut v, o, c) =
        iter.into_iter()
            .fold((Vec::new(), None, 0), |(mut v, last, count), item| {
                if let Some(o) = last {
                    if item == o {
                        (v, Some(o), count + 1)
                    } else {
                        v.push((o, count));
                        (v, Some(item), 1)
                    }
                } else {
                    (v, Some(item), 1)
                }
            });
    if let Some(i) = o {
        v.push((i, c));
    }
    v
}

fn partial_sum<T>(v: impl Iterator<Item = T>) -> impl Iterator<Item = T>
where
    T: Default + std::ops::Add<Output = T> + Copy,
{
    v.scan(T::default(), |state, x| {
        *state = *state + x;
        Some(*state)
    })
}

fn partial_max<T>(v: impl Iterator<Item = T>) -> impl Iterator<Item = T>
where
    T: Default + Ord + Copy,
{
    v.scan(T::default(), |state, x| {
        *state = max(*state, x);
        Some(*state)
    })
}

fn partial_min(v: impl Iterator<Item = u64>) -> impl Iterator<Item = u64> {
    v.scan(std::u64::MAX, |state, x| {
        *state = min(*state, x);
        Some(*state)
    })
}

fn max_subarray(v: impl Iterator<Item = i64>) -> (i64, (usize, usize)) {
    //assert!(v.len() > 0);
    let mut best_sum = 0;
    let (mut best_start, mut best_end) = (0, 0);
    let mut current_sum = 0;
    let mut current_start = 0;
    for (end, val) in v.enumerate() {
        if current_sum <= 0 {
            current_start = end;
            current_sum = val;
        } else {
            current_sum += val;
        }
        if current_sum > best_sum {
            best_sum = current_sum;
            best_start = current_start;
            best_end = end + 1;
        }
    }
    (best_sum, (best_start, best_end))
}

fn gcd(mut a: u64, mut b: u64) -> u64 {
    while a != 0 {
        let old_m = a;
        a = b % a;
        b = old_m;
    }
    b
}

/// returns gcd, and pair (x, y), such that x * a + b * y == gcd
fn egcd(a: i64, b: i64) -> (i64, i64, i64) {
    if a == 0 {
        (b, 0, 1)
    } else {
        let (g, x, y) = egcd(b % a, a);
        (g, y - (b / a) * x, x)
    }
}

fn factorize(mut n: u64) -> Vec<u64> {
    if n <= 3 {
        return vec![n];
    }
    let mut v = Vec::new();
    while n % 2 == 0 {
        n /= 2;
        v.push(2);
    }
    while n % 3 == 0 {
        n /= 3;
        v.push(3);
    }
    let mut f = 6;
    while (f - 1) * (f - 1) <= n {
        while n % (f - 1) == 0 {
            n /= f - 1;
            v.push(f - 1);
        }
        while n % (f + 1) == 0 {
            n /= f + 1;
            v.push(f + 1);
        }
        f += 6;
    }
    if n > 1 {
        v.push(n);
    }
    v
}

fn compact_factors(n: u64) -> Vec<(u64, usize)> {
    count(&mut factorize(n).into_iter())
}

fn all_factors(n: u64) -> Vec<u64> {
    if n == 0 {
        return vec![0];
    } else if n == 1 {
        return vec![1];
    }
    let factors = compact_factors(n);
    let mut v = vec![1];
    for (fac, num) in factors {
        let ori = v.clone();
        for i in 1..num + 1 {
            v.append(
                &mut ori
                    .clone()
                    .into_iter()
                    .map(|f| f * fac.pow(i as u32))
                    .collect::<Vec<_>>(),
            )
        }
    }
    v.sort();
    v
}

fn abs_diff<T>(a: T, b: T) -> T
where
    T: PartialOrd + std::ops::Sub<Output = T>,
{
    if a > b {
        a - b
    } else {
        b - a
    }
}

struct Permutations<T> {
    inner: Vec<T>,
    state: Vec<usize>,
    i: usize,
    start: bool,
}

impl<T> Permutations<T> {
    fn new(inner: Vec<T>) -> Self {
        Self {
            state: vec![0; inner.len()],
            i: 0,
            start: true,
            inner,
        }
    }
}

/*impl<T, X> From<X> for Permutations<T>
where
    X: IntoIterator<Item = T>,
{
    fn from(f: X) -> Self {
        Self::new(f.into_iter().collect::<Vec<T>>())
    }
}*/

impl<T> Iterator for Permutations<T>
where
    T: Clone,
{
    type Item = Vec<T>;
    fn next(&mut self) -> Option<Self::Item> {
        if self.start {
            self.start = false;
            return Some(self.inner.clone());
        }
        while self.i < self.inner.len() {
            if self.state[self.i] < self.i {
                if self.i % 2 == 0 {
                    self.inner.swap(0, self.i)
                } else {
                    self.inner.swap(self.state[self.i], self.i)
                }
                self.state[self.i] += 1;
                self.i = 0;
                return Some(self.inner.clone());
            } else {
                self.state[self.i] = 0;
                self.i += 1;
            }
        }
        None
    }
}

use std::cmp::{max, min, Ord, Ordering};
use std::collections::{BinaryHeap, VecDeque};
use std::mem::swap;

#[derive(Clone)]
struct Graph {
    nodes: usize,
    edges: Vec<Vec<(usize, u64)>>,
}

impl Graph {
    fn new(n: usize) -> Self {
        Self {
            nodes: n,
            edges: vec![Vec::new(); n + 1],
        }
    }

    fn add_edge(&mut self, x: usize, y: usize, cost: u64) {
        self.edges[x].push((y, cost));
        self.edges[y].push((x, cost));
    }

    fn dijkstra(&mut self, start: usize, end: usize) -> u64 {
        let mut dist = vec![None; self.nodes + 1];
        let mut prev = vec![None; self.nodes + 1];
        dist[start] = Some(0);
        let mut queue = (1..=self.nodes).collect::<Vec<_>>();
        queue.sort_unstable_by_key(|node| dist[*node].unwrap_or(std::u64::MAX));
        queue.reverse();
        while let Some(next_node) = queue.pop() {
            if next_node == end {
                return dist[next_node].unwrap();
            }
            for (neighbour, cost) in self.edges[next_node].iter() {
                let alt = dist[next_node].unwrap() + cost;
                if dist[*neighbour].is_none() {
                    dist[*neighbour] = Some(alt);
                    prev[*neighbour] = Some(next_node);
                } else {
                    if alt < dist[*neighbour].unwrap() {
                        dist[*neighbour] = Some(alt);
                        prev[*neighbour] = Some(next_node);
                    }
                }
            }
            //println!("{:?} {:?}", dist, prev);
            queue.sort_unstable_by_key(|node| dist[*node].unwrap_or(std::u64::MAX));
            queue.reverse();
        }
        0
    }

    fn set_cost(&mut self, x: usize, y: usize, cost: u64) {
        for i in 0..self.edges[x].len() {
            if self.edges[x][i].0 == y {
                self.edges[x][i].1 = cost
            }
        }
        for i in 0..self.edges[y].len() {
            if self.edges[y][i].0 == x {
                self.edges[y][i].1 = cost
            }
        }
    }
}

const MODULO: u64 = 1_000_000_007;

#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
struct BigPrimeRing {
    inner: u64,
}

impl<T> From<T> for BigPrimeRing
where
    T: Into<u64>,
{
    fn from(n: T) -> Self {
        Self {
            inner: n.into() % MODULO,
        }
    }
}

impl<T> std::ops::Add<T> for BigPrimeRing
where
    T: Into<Self>,
{
    type Output = BigPrimeRing;
    fn add(self, rhs: T) -> Self::Output {
        Self {
            inner: (self.inner + rhs.into().inner) % MODULO,
        }
    }
}

impl<T> std::ops::AddAssign<T> for BigPrimeRing
where
    T: Into<Self>,
{
    fn add_assign(&mut self, rhs: T) {
        self.inner += rhs.into().inner;
        self.inner %= MODULO;
    }
}

impl<T> std::ops::Sub<T> for BigPrimeRing
where
    T: Into<Self>,
{
    type Output = BigPrimeRing;
    fn sub(self, rhs: T) -> Self::Output {
        Self {
            inner: (self.inner + MODULO - rhs.into().inner) % MODULO,
        }
    }
}

impl<T> std::ops::SubAssign<T> for BigPrimeRing
where
    T: Into<Self>,
{
    fn sub_assign(&mut self, rhs: T) {
        self.inner += MODULO;
        self.inner -= rhs.into().inner;
        self.inner %= MODULO;
    }
}

impl<T> std::ops::Mul<T> for BigPrimeRing
where
    T: Into<Self>,
{
    type Output = BigPrimeRing;
    fn mul(self, rhs: T) -> Self::Output {
        Self {
            inner: (self.inner * rhs.into().inner) % MODULO,
        }
    }
}

impl<T> std::ops::MulAssign<T> for BigPrimeRing
where
    T: Into<Self>,
{
    fn mul_assign(&mut self, rhs: T) {
        self.inner *= rhs.into().inner;
        self.inner %= MODULO;
    }
}

impl BigPrimeRing {
    fn inverse(self) -> Self {
        if self.inner == 0 {
            return self;
        }
        let (_g, mut x, _y) = egcd(self.inner as i64, MODULO as i64);
        if x < 0 {
            x += MODULO as i64;
        }
        Self { inner: x as u64 }
    }
}

macro_rules! max_with {
    ($x: expr, $y: expr) => {
        $x = max($x, $y)
    };
}

macro_rules! min_with {
    ($x: expr, $y: expr) => {
        $x = max($x, $y)
    };
}

fn is_prime(n: u64) -> bool {
    factorize(n).len() == 1
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let r = read::<u64>();
    if r < 5 {
        println!("NO");
        return Ok(());
    }
    let mut x = 1;
    let mut part = x * x + x + 1;
    while part < r {
        if (r - part) % (2 * x) == 0 {
            println!("{} {}", x, (r - part) / (2 * x));
            return Ok(());
        }
        x += 1;
        part = x * x + x + 1;
    }
    println!("NO");
    Ok(())
}


fn main() {
    let mut text = String::new();
    std::io::stdin().read_line(&mut text).expect("");
    let n = text.trim().parse::<i64>().expect("");

    if n > 3 && n % 2 == 1 {
        println!("1 {}", (n - 3) / 2)
    } else {
        println!("NO")
    }
}


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

fn main() {
    let mut line = String::new();
    let stdin = io::stdin();
    stdin
        .lock()
        .read_line(&mut line)
        .expect("could not read line!");

    let line = line.trim();
    let path = line
        .split('/')
        .filter(|s| !s.is_empty())
        .collect::<Vec<&str>>();

    println!("/{}", path.join("/"));
}


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

use std::collections::{HashSet, HashMap};
use std::cmp::{min,max,Reverse};
use std::io::{self, prelude::*};
use std::{str, iter};

struct Scanner<R> {
    reader: R,
    buf_str: Vec<u8>,
    buf_iter: str::SplitWhitespace<'static>,
}
impl<R: BufRead> Scanner<R> {
    fn new(reader: R) -> Self {
        Self { reader, buf_str: vec![], buf_iter: "".split_whitespace() }
    }
    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_whitespace())
            }
        }
    }
}

const MAX : usize = 444;

fn solve<R: BufRead, W: Write>(scan: &mut Scanner<R>, w: &mut W) {
    let N : usize = scan.token();
    let K : usize = scan.token();
    let L : i64 = scan.token();
    let d : Vec<i64> = iter::repeat_with(|| scan.token()).take(N).collect();
    let p : Vec<i64> = (0..K).chain((1..K+1).rev()).cycle().take(4*K).map(|x| x as i64).collect();

    let mut dp = [[false; MAX]; MAX];
    dp[N] = [true; MAX];

    for i in (0..N).rev() {
        for j in (0..4*K).rev() {
            dp[i][j] = (d[i] + p[j] <= L) && (dp[i][j+1] || dp[i+1][(j+1)%(2*K)]);
        }
    }
    // for i in (0..N).rev() {
    //     println!("{}, {:?}",i,&dp[i][0..2*K]);
    // }

    writeln!(w, "{}", if dp[0].iter().any(|&x|x) {"Yes"} else {"No"});
}

fn main() {
    let (stdin, stdout) = (io::stdin(), io::stdout());
    let mut scan = Scanner::new(stdin.lock());
    let mut out = io::BufWriter::new(stdout.lock());
    for _ in 0..scan.token::<i32>() {
        solve(&mut scan, &mut out);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    pub fn new() -> Self {
        Self {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(String::from)
            .collect();
        self.index = 0;
    }
}

fn tide(k: usize, time: usize) -> usize {
    let time = time % (2 * k);
    if time <= k {
        time
    } else {
        2 * k - time
    }
}

fn depth(k: usize, depths: &Vec<usize>, time: usize, index: usize) -> usize {
    depths[index] + tide(k, time)
}

fn prev_time(k: usize, time: usize) -> usize {
    if time == 0 {
        2 * k - 1
    } else {
        time - 1
    }
}

fn possible(k: usize, l: usize, depths: &Vec<usize>) -> bool {
    let mut dp = vec![vec![false; 2 * k]; depths.len()];
    for i in 0..2 * k {
        if depth(k, depths, i, 0) <= l {
            dp[0][i] = true;
        }
    }

    for i in 1..depths.len() {
        for t in 0..2 * k {
            let p = prev_time(k, t);
            let d = depth(k, depths, t, i);

            if d > l {
                continue;
            } else if dp[i - 1][p] {
                dp[i][t] = true;
            } else if dp[i][p] {
                dp[i][t] = true;
            }
        }
    }
    dp[depths.len() - 1].iter().any(|&b| b)
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next();

    for _ in 0..tests {
        let _ = reader.next::<usize>();
        let k = reader.next();
        let l = reader.next();
        let depths = reader.vector();

        let res = possible(k, l, &depths);
        println!("{}", if res { "Yes" } else { "No" });
    }
}


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

use std::cmp::*;
use std::collections::*;
use std::io;
use std::ops::{self, Range};
use std::str::FromStr;

#[derive(Clone, Debug, Default)]
struct ProblemState {
}

impl Problem {
    fn solve(&mut self) {
        let n: usize = self.scan();
        let k: usize = self.scan();
        let l: usize = self.scan();
        let d: Vec<usize> = self.scan_vec(n);

        let mut x = vec![vec![0; 2 * k]; n];
        let mut p = vec![0; 2 * k];

        for i in 0..k {
            p[i] = i;
            p[2 * k - i - 1] = i + 1;
        }

        for i in 0..n {
            for j in 0..2 * k {
                if d[i] + p[j] <= l {
                    if i == 0 {
                        x[i][j] = 1;
                    } else {
                        x[i][j] |= x[i - 1][(j - 1 + 2 * k) % (2 * k)];
                        x[i][j] |= x[i][(j - 1 + 2 * k) % (2 * k)];
                    }
                }
            }
        }

        if x[n - 1].iter().any(|x_i| *x_i == 1) {
            println!("Yes");
        } else {
            println!("No");
        }

//        eprintln!("{:?}", x[n - 1]);
    }
}

fn main() {
    Problem::new().solve_cases();
}

struct Problem {
    input_state: InputState,
    problem_state: ProblemState,
}

struct InputState {
    stdin: io::Stdin,
    buffer: String,
    tokens: VecDeque<String>,
}

impl Problem {
    fn new() -> Self {
        Self {
            input_state: InputState {
                stdin: io::stdin(),
                buffer: String::new(),
                tokens: VecDeque::new(),
            },
            problem_state: Default::default(),
        }
    }

    fn solve_cases(&mut self) {
        for _ in 0usize..self.scan() {
            self.solve()
        }
    }

    fn scan<T: FromStr>(&mut self) -> T {
        while self.input_state.tokens.is_empty() {
            self.input_state.stdin.read_line(&mut self.input_state.buffer).unwrap();

            for token in self.input_state.buffer.split_ascii_whitespace() {
                self.input_state.tokens.push_back(token.to_string());
            }

            self.input_state.buffer.clear();
        }

        self.input_state.tokens.pop_front().unwrap().parse().ok().unwrap()
    }

    fn scan_vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).into_iter().map(|_| self.scan()).collect()
    }

    fn scan_line(&mut self) -> String {
        let mut line = String::new();
        self.input_state.stdin.read_line(&mut line).unwrap();
        while line.ends_with('\n') || line.ends_with('\r') { line.pop(); }
        line
    }

    fn scan_line_vec(&mut self, n: usize) -> Vec<String> {
        (0..n).into_iter().map(|_| self.scan_line()).collect()
    }
}

impl ops::Deref for Problem {
    type Target = ProblemState;

    fn deref(&self) -> &ProblemState {
        &self.problem_state
    }
}

impl ops::DerefMut for Problem {
    fn deref_mut(&mut self) -> &mut ProblemState {
        &mut self.problem_state
    }
}


#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

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

fn calc_depth(d: &Vec<i64>, p: &Vec<i64>, ki: usize, ni: usize) -> i64 {
    d[ni - 1] + p[ki]
}

fn solve() -> bool {
    let v = read_vec::<usize>();
    let (n, k, l) = (v[0], v[1], v[2] as i64);
    let d = read_vec::<i64>();
    let p = (0..2 * k)
        .map(|x| if x <= k { x as i64 } else { (2 * k - x) as i64 })
        .collect::<Vec<_>>();

    let mut dp = vec![vec![false; 2 * k]; n + 1];
    for ki in 0..2 * k {
        dp[0][ki] = true;
    }

    for ni in 1..n + 1 {
        for ki in 0..2 * k {
            let next_k = (ki + 1) % (2 * k);
            if dp[ni - 1][ki] && calc_depth(&d, &p, next_k, ni) <= l {
                dp[ni][next_k] = true;
            }
        }
        for ki in 0..2 * k {
            let next_k = (ki + 1) % (2 * k);
            if dp[ni][ki] && calc_depth(&d, &p, next_k, ni) <= l {
                dp[ni][next_k] = true;
            }
        }
    }

    dp[n].iter().any(|&x| x)
}

fn main() {
    let n = read::<usize>();
    for i in 0..n {
        if solve() {
            println!("Yes");
        } else {
            println!("No");
        }
    }
}

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

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}


pub trait Readable {
    type Output;
    fn words_count() -> usize;
    fn read_words(words: &[&str]) -> Result<Self::Output, String>;
}
#[macro_export]
macro_rules! readable {
    ( $ t : ty , $ words_count : expr , |$ words : ident | $ read_words : expr ) => {
        impl Readable for $t {
            type Output = $t;
            fn words_count() -> usize {
                $words_count
            }
            fn read_words($words: &[&str]) -> Result<$t, String> {
                Ok($read_words)
            }
        }
    };
}
readable!((), 1, |_ss| ());
readable!(String, 1, |ss| ss[0].to_string());
impl Readable for char {
    type Output = char;
    fn words_count() -> usize {
        1
    }
    fn read_words(words: &[&str]) -> Result<char, String> {
        let chars: Vec<char> = words[0].chars().collect();
        if chars.len() == 1 {
            Ok(chars[0])
        } else {
            Err(format!("cannot parse `{}` as a char", words[0]))
        }
    }
}
pub struct Chars();
impl Readable for Chars {
    type Output = Vec<char>;
    fn words_count() -> usize {
        1
    }
    fn read_words(words: &[&str]) -> Result<Vec<char>, String> {
        Ok(words[0].chars().collect())
    }
}
macro_rules ! impl_readable_for_ints { ( $ ( $ t : ty ) * ) => { $ ( impl Readable for $ t { type Output = Self ; fn words_count ( ) -> usize { 1 } fn read_words ( words : & [ & str ] ) -> Result <$ t , String > { use std :: str :: FromStr ; <$ t >:: from_str ( words [ 0 ] ) . map_err ( | _ | { format ! ( "cannot parse `{}` as {}" , words [ 0 ] , stringify ! ( $ t ) ) } ) } } ) * } ; }
impl_readable_for_ints ! ( i8 u8 i16 u16 i32 u32 i64 u64 isize usize f32 f64 ) ;
macro_rules ! define_one_origin_int_types { ( $ new_t : ident $ int_t : ty ) => { # [ doc = " Converts 1-origin integer into 0-origin when read from stdin." ] # [ doc = "" ] # [ doc = " # Example" ] # [ doc = "" ] # [ doc = " ```no_run" ] # [ doc = " # #[macro_use] extern crate atcoder_snippets;" ] # [ doc = " # use atcoder_snippets::read::*;" ] # [ doc = " // Stdin: \"1\"" ] # [ doc = " read!(a = usize_);" ] # [ doc = " assert_eq!(a, 0);" ] # [ doc = " ```" ] # [ allow ( non_camel_case_types ) ] pub struct $ new_t ; impl Readable for $ new_t { type Output = $ int_t ; fn words_count ( ) -> usize { 1 } fn read_words ( words : & [ & str ] ) -> Result < Self :: Output , String > { <$ int_t >:: read_words ( words ) . map ( | n | n - 1 ) } } } ; ( $ new_t : ident $ int_t : ty ; $ ( $ inner_new_t : ident $ inner_int_t : ty ) ;* ) => { define_one_origin_int_types ! ( $ new_t $ int_t ) ; define_one_origin_int_types ! ( $ ( $ inner_new_t $ inner_int_t ) ;* ) ; } ; }
define_one_origin_int_types ! ( u8_ u8 ; u16_ u16 ; u32_ u32 ; u64_ u64 ; usize_ usize ) ;
macro_rules ! impl_readable_for_tuples { ( $ t : ident $ var : ident ) => ( ) ; ( $ t : ident $ var : ident ; $ ( $ inner_t : ident $ inner_var : ident ) ;* ) => { impl_readable_for_tuples ! ( $ ( $ inner_t $ inner_var ) ;* ) ; impl <$ t : Readable , $ ( $ inner_t : Readable ) ,*> Readable for ( $ t , $ ( $ inner_t ) ,* ) { type Output = ( <$ t >:: Output , $ ( <$ inner_t >:: Output ) ,* ) ; fn words_count ( ) -> usize { let mut n = <$ t >:: words_count ( ) ; $ ( n += <$ inner_t >:: words_count ( ) ; ) * n } # [ allow ( unused_assignments ) ] fn read_words ( words : & [ & str ] ) -> Result < Self :: Output , String > { let mut start = 0 ; let $ var = <$ t >:: read_words ( & words [ start .. start +<$ t >:: words_count ( ) ] ) ?; start += <$ t >:: words_count ( ) ; $ ( let $ inner_var = <$ inner_t >:: read_words ( & words [ start .. start +<$ inner_t >:: words_count ( ) ] ) ?; start += <$ inner_t >:: words_count ( ) ; ) * Ok ( ( $ var , $ ( $ inner_var ) ,* ) ) } } } ; }
impl_readable_for_tuples ! ( T8 x8 ; T7 x7 ; T6 x6 ; T5 x5 ; T4 x4 ; T3 x3 ; T2 x2 ; T1 x1 ) ;
pub trait ReadableFromLine {
    type Output;
    fn read_line(line: &str) -> Result<Self::Output, String>;
}
fn split_into_words(line: &str) -> Vec<&str> {
    #[allow(deprecated)]
    line.trim_right_matches('\n').split_whitespace().collect()
}
impl<T: Readable> ReadableFromLine for T {
    type Output = T::Output;
    fn read_line(line: &str) -> Result<T::Output, String> {
        let words = split_into_words(line);
        if words.len() != T::words_count() {
            return Err(format!(
                "line `{}` has {} words, expected {}",
                line,
                words.len(),
                T::words_count()
            ));
        }
        T::read_words(&words)
    }
}
macro_rules ! impl_readable_from_line_for_tuples_with_from_iterator { ( $ u : ident : $ ( + $ bound : path ) * => $ seq_in : ty , $ seq_out : ty ; $ t : ident $ var : ident ) => { impl <$ u : Readable > ReadableFromLine for $ seq_in where <$ u as Readable >:: Output : Sized $ ( + $ bound ) * { type Output = $ seq_out ; fn read_line ( line : & str ) -> Result <$ seq_out , String > { let n = $ u :: words_count ( ) ; let words = split_into_words ( line ) ; if words . len ( ) % n != 0 { return Err ( format ! ( "line `{}` has {} words, expected multiple of {}" , line , words . len ( ) , n ) ) ; } let mut result = Vec :: new ( ) ; for chunk in words . chunks ( n ) { match $ u :: read_words ( chunk ) { Ok ( v ) => result . push ( v ) , Err ( msg ) => { let flagment_msg = if n == 1 { format ! ( "word {}" , result . len ( ) ) } else { let l = result . len ( ) ; format ! ( "words {}-{}" , n * l + 1 , ( n + 1 ) * l ) } ; return Err ( format ! ( "{} of line `{}`: {}" , flagment_msg , line , msg ) ) ; } } } Ok ( result . into_iter ( ) . collect ( ) ) } } impl < T : Readable , $ u : Readable > ReadableFromLine for ( T , $ seq_in ) where <$ u as Readable >:: Output : Sized $ ( + $ bound ) * { type Output = ( T :: Output , $ seq_out ) ; fn read_line ( line : & str ) -> Result < Self :: Output , String > { let n = T :: words_count ( ) ; # [ allow ( deprecated ) ] let trimmed = line . trim_right_matches ( '\n' ) ; let words_and_rest : Vec <& str > = trimmed . splitn ( n + 1 , ' ' ) . collect ( ) ; if words_and_rest . len ( ) < n { return Err ( format ! ( "line `{}` has {} words, expected at least {}" , line , words_and_rest . len ( ) , n ) ) ; } let words = & words_and_rest [ .. n ] ; let empty_str = "" ; let rest = words_and_rest . get ( n ) . unwrap_or ( & empty_str ) ; Ok ( ( T :: read_words ( words ) ?, <$ seq_in >:: read_line ( rest ) ? ) ) } } } ; ( $ u : ident : $ ( + $ bound : path ) * => $ seq_in : ty , $ seq_out : ty ; $ t : ident $ var : ident , $ ( $ inner_t : ident $ inner_var : ident ) ,+ ) => { impl_readable_from_line_for_tuples_with_from_iterator ! ( $ u : $ ( + $ bound ) * => $ seq_in , $ seq_out ; $ ( $ inner_t $ inner_var ) ,+ ) ; impl <$ t : Readable , $ ( $ inner_t : Readable ) ,+ , $ u : Readable > ReadableFromLine for ( $ t , $ ( $ inner_t ) ,+ , $ seq_in ) where <$ u as Readable >:: Output : Sized $ ( + $ bound ) * { type Output = ( $ t :: Output , $ ( $ inner_t :: Output ) ,+ , $ seq_out ) ; fn read_line ( line : & str ) -> Result < Self :: Output , String > { let mut n = $ t :: words_count ( ) ; $ ( n += $ inner_t :: words_count ( ) ; ) + # [ allow ( deprecated ) ] let trimmed = line . trim_right_matches ( '\n' ) ; let words_and_rest : Vec <& str > = trimmed . splitn ( n + 1 , ' ' ) . collect ( ) ; if words_and_rest . len ( ) < n { return Err ( format ! ( "line `{}` has {} words, expected at least {}" , line , words_and_rest . len ( ) , n ) ) ; } let words = & words_and_rest [ .. n ] ; let empty_str = "" ; let rest = words_and_rest . get ( n ) . unwrap_or ( & empty_str ) ; let ( $ var , $ ( $ inner_var ) ,* ) = < ( $ t , $ ( $ inner_t ) ,+ ) >:: read_words ( words ) ?; Ok ( ( $ var , $ ( $ inner_var ) ,* , <$ seq_in >:: read_line ( rest ) ? ) ) } } } ; }
#[macro_export]
macro_rules ! readable_collection { ( $ u : ident => $ collection_in : ty , $ collection_out : ty ) => { impl_readable_from_line_for_tuples_with_from_iterator ! ( $ u : => $ collection_in , $ collection_out ; T8 x8 , T7 x7 , T6 x6 , T5 x5 , T4 t4 , T3 t3 , T2 t2 , T1 t1 ) ; } ; ( $ u : ident : $ ( $ bound : path ) ,* => $ collection_in : ty , $ collection_out : ty ) => { impl_readable_from_line_for_tuples_with_from_iterator ! ( $ u : $ ( + $ bound ) * => $ collection_in , $ collection_out ; T8 x8 , T7 x7 , T6 x6 , T5 x5 , T4 t4 , T3 t3 , T2 t2 , T1 t1 ) ; } }
readable_collection ! ( U => Vec < U >, Vec < U :: Output > ) ;
readable_collection ! ( U : Eq , std :: hash :: Hash => std :: collections :: HashSet < U >, std :: collections :: HashSet < U :: Output > ) ;
pub fn read<T: ReadableFromLine>() -> T::Output {
    let mut line = String::new();
    std::io::stdin().read_line(&mut line).unwrap();
    T::read_line(&line).unwrap()
}
#[macro_export]
macro_rules ! read { ( ) => { let mut line = String :: new ( ) ; std :: io :: stdin ( ) . read_line ( & mut line ) . unwrap ( ) ; } ; ( $ pat : pat = $ t : ty ) => { let $ pat = read ::<$ t > ( ) ; } ; ( $ ( $ pat : pat = $ t : ty ) ,+ ) => { read ! ( ( $ ( $ pat ) ,* ) = ( $ ( $ t ) ,* ) ) ; } ; }
#[macro_export]
macro_rules ! readls { ( $ ( $ pat : pat = $ t : ty ) ,+ ) => { $ ( read ! ( $ pat = $ t ) ; ) * } ; }
pub fn readx<T: ReadableFromLine>() -> Vec<T::Output> {
    use std::io::{self, BufRead};
    let stdin = io::stdin();
    let result = stdin
        .lock()
        .lines()
        .map(|line_result| {
            let line = line_result.expect("read from stdin failed");
            T::read_line(&line).unwrap()
        })
        .collect();
    result
}
#[macro_export]
macro_rules ! readx_loop { ( |$ pat : pat = $ t : ty | $ body : expr ) => { use std :: io :: BufRead ; let stdin = std :: io :: stdin ( ) ; for line in stdin . lock ( ) . lines ( ) { let line = line . expect ( "read from stdin failed" ) ; let $ pat = <$ t >:: read_line ( & line ) . unwrap ( ) ; $ body } } ; ( |$ ( $ pat : pat = $ t : ty ) ,*| $ body : expr ) => { readx_loop ! ( | ( $ ( $ pat ) ,* ) = ( $ ( $ t ) ,* ) | $ body ) ; } ; }
pub fn readn<T: ReadableFromLine>(n: usize) -> Vec<T::Output> {
    use std::io::{self, BufRead};
    let stdin = io::stdin();
    let result: Vec<T::Output> = stdin
        .lock()
        .lines()
        .take(n)
        .map(|line_result| {
            let line = line_result.expect("read from stdin failed");
            T::read_line(&line).unwrap()
        })
        .collect();
    if result.len() < n {
        panic!(
            "expected reading {} lines, but only {} lines are read",
            n,
            result.len()
        );
    }
    result
}
#[macro_export]
macro_rules ! readn_loop { ( $ n : expr , |$ pat : pat = $ t : ty | $ body : expr ) => { use std :: io :: BufRead ; let stdin = std :: io :: stdin ( ) ; { let mut lock = stdin . lock ( ) ; for _ in 0 ..$ n { let mut line = String :: new ( ) ; lock . read_line ( & mut line ) . expect ( "read from stdin failed" ) ; let $ pat = <$ t >:: read_line ( & line ) . unwrap ( ) ; $ body } } } ; ( $ n : expr , |$ ( $ pat : pat = $ t : ty ) ,*| $ body : expr ) => { readn_loop ! ( $ n , | ( $ ( $ pat ) ,* ) = ( $ ( $ t ) ,* ) | $ body ) ; } ; }
pub trait Words {
    fn read<T: Readable>(&self) -> T::Output;
}
impl<'a> Words for [&'a str] {
    fn read<T: Readable>(&self) -> T::Output {
        T::read_words(self).unwrap()
    }
}
impl<'a> Words for &'a str {
    fn read<T: Readable>(&self) -> T::Output {
        T::read_words(&[self]).unwrap()
    }
}

fn main() {
    read!(x = i16, y = i16, z = i16);
    let t = x - y;
    let ans = if t - z > 0 {
        '+'
    } else if t + z < 0 {
        '-'
    } else if t == 0 && z == 0 {
        '0'
    } else {
        '?'
    };
    println!("{}", ans);
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

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

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

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

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

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

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

fn main() {
    input! {
        x: i32,
        y: i32,
        z: i32,
    }

    let a = x - y;
    if a > 0 && a > z {
        println!("+");
    } else if a < 0 && -a > z {
        println!("-");
    } else if a == 0 && z == 0 {
        println!("0");
    } else {
        println!("?");
    }
}


// use wyf_lib::*;

fn main() {
    let n: usize = read();
    let m: usize = read();

    if n == 1 {
        println!("1");
        return;
    }

    let mut k = 0;
    while 1 << k < n {
        k += 1;
    }
    let mut dp = vec![false; k * m + 1];
    let mut cnts = vec![0];
    for i in 1..=k {
        let mut cnt = 0;
        for j in 1..=m {
            let cur = i * j;
            if !dp[cur] {
                dp[cur] = true;
                cnt += 1;
            }
        }
        cnts.push(cnt);
    }
    let mut counted = vec![false; n + 1];

    let mut res: i64 = 1;
    'i: for i in 2..=n {
        let mut c = 1;
        let mut curr = i;

        while curr <= n {
            if counted[curr] {
                continue 'i;
            }
            counted[curr] = true;
            res += cnts[c];
            curr *= i;
            c += 1;
        }
    }

    res.println();
}

use std::error;
use std::fmt;
use std::str::FromStr;

#[non_exhaustive]
#[derive(Debug, PartialEq)]
pub enum Error {
    MissingMatch,
    MissingClosingBrace,
    UnexpectedValue(u8, Option<u8>),
    InvalidUtf8(Vec<u8>),
    PartialUtf8(usize, Vec<u8>),
    Parse(String, &'static str),
}

impl error::Error for Error {}

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        use crate::Error::*;
        use std::str::from_utf8;

        match *self {
            InvalidUtf8(ref raw) => write!(f, "input was not valid utf8: {:?}", raw),
            Parse(ref s, arg) => write!(f, "could not parse {} as target type of {}", s, arg),
            UnexpectedValue(exp, act) => write!(
                f,
                "found value {:?} not matching the pattern value {}",
                act.map(|b| b as char),
                exp as char
            ),
            PartialUtf8(n, ref raw) => write!(
                f,
                "input was only partially valid utf8: \"{}\" followed by {:?}",
                from_utf8(&raw[..n]).unwrap(),
                &raw[n..]
            ),
            MissingMatch => write!(f, "Bad read! format string: did not contain {{}}"),
            MissingClosingBrace => write!(
                f,
                "found single open curly brace at the end of the format string"
            ),
        }
    }
}

pub fn match_next(expected: u8, iter: &mut dyn Iterator<Item = u8>) -> Result<(), Error> {
    let next = iter.next();
    if next != Some(expected) {
        return Err(Error::UnexpectedValue(expected, next));
    }
    Ok(())
}

pub fn parse_capture<T>(
    name: &'static str,
    next: Option<u8>,
    iter: &mut dyn Iterator<Item = u8>,
) -> Result<T, Error>
where
    T: FromStr,
    <T as FromStr>::Err: ::std::fmt::Debug,
{
    static WHITESPACES: &[u8] = b"\t\r\n ";
    let raw: Vec<u8> = match next {
        Some(c) => iter.take_while(|&ch| ch != c).collect(),
        None => iter
            .skip_while(|ch| WHITESPACES.contains(ch))
            .take_while(|ch| !WHITESPACES.contains(ch))
            .collect(),
    };
    match String::from_utf8(raw) {
        Ok(s) => FromStr::from_str(&s).map_err(|_| Error::Parse(s, name)),
        Err(e) => {
            let n = e.utf8_error().valid_up_to();
            let raw = e.into_bytes();
            if n == 0 {
                Err(Error::InvalidUtf8(raw))
            } else {
                Err(Error::PartialUtf8(n, raw))
            }
        }
    }
}

#[macro_export]
macro_rules! try_read(
    () => { $crate::try_read!("{}") };
    ($text:expr) => {{
        (|| -> std::result::Result<_, $crate::Error> {
            let __try_read_var__;
            $crate::try_scan!($text, __try_read_var__);
            Ok(__try_read_var__)
        })()
    }};
    ($text:expr, $input:expr) => {{
        (|| -> std::result::Result<_, $crate::Error> {
            let __try_read_var__;
            $crate::try_scan!($input => $text, __try_read_var__);
            Ok(__try_read_var__)
        })()
    }};
);

#[macro_export]
macro_rules! try_scan(
    ($pattern:expr, $($arg:expr),*) => {
        use ::std::io::Read;
        $crate::try_scan!(::std::io::stdin().bytes().map(std::result::Result::unwrap) => $pattern, $($arg),*);
    };
    ($input:expr => $pattern:expr, $($arg:expr),*) => {{
        $crate::try_scan!(@impl question_mark; $input => $pattern, $($arg),*)
    }};
    (@question_mark: $($e:tt)+) => {{
        ($($e)+)?
    }};
    (@unwrap: $($e:tt)+) => {{
        ($($e)+).unwrap()
    }};
    (@impl $action:tt; $input:expr => $pattern:expr, $($arg:expr),*) => {{
        #![allow(clippy::try_err)]
        use $crate::{Error, match_next, parse_capture};

        // typesafe macros :)
        let pattern: &'static str = $pattern;
        let stdin: &mut dyn Iterator<Item = u8> = &mut ($input);

        let mut pattern = pattern.bytes();

        $(
            $arg = loop {
                match $crate::try_scan!(@$action: pattern.next().ok_or(Error::MissingMatch)) {
                    b'{' => match $crate::try_scan!(@$action: pattern.next().ok_or(Error::MissingClosingBrace)) {
                        b'{' => $crate::try_scan!(@$action: match_next(b'{', stdin)),
                        b'}' => break $crate::try_scan!(@$action: parse_capture(stringify!($arg), pattern.next(), stdin)),
                        _ => return $crate::try_scan!(@$action: Err(Error::MissingClosingBrace)),
                    },
                    c => $crate::try_scan!(@$action: match_next(c, stdin)),
                }
            };
        )*

        for c in pattern {
            $crate::try_scan!(@$action: match_next(c, stdin))
        }

        format_args!($pattern, $($arg),*);
    }};
);

#[macro_export]
macro_rules! read(
    ($($arg:tt)*) => {
        $crate::try_read!($($arg)*).unwrap()
    };
);

#[macro_export]
macro_rules! scan(
    ($text:expr, $($arg:expr),*) => {
        {
            use ::std::io::Read;
            $crate::scan!(::std::io::stdin().bytes().map(std::result::Result::unwrap) => $text, $($arg),*);
        }
    };
    ($input:expr => $pattern:expr, $($arg:expr),*) => {{
        $crate::try_scan!(@impl unwrap; $input => $pattern, $($arg),*)
    }};
);
use std::marker::PhantomData;
use std::ops;

// use text_io::read;

/*** READ and WRITE ***/

pub trait Readable {
    fn read() -> Self;
}

pub trait Printable {
    fn print(self: &Self);
    fn println(self: &Self) {
        self.print();
        println!();
    }
}

macro_rules! impl_rp_simple {
    ($($t:ident), +) => {
        $(
            impl Readable for $t {
                fn read() -> Self {
                    read!()
                }
            }

            impl Printable for $t {
                fn print(self: &Self) {
                    print!("{self} ");
                }
            }
        )+
    };
}

impl_rp_simple!(
    String, i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize, f32, f64, char
);

macro_rules! impl_rp_tuple {
    () => {};
    ($t0:ident, $($t:ident,) *) => {
        impl<$t0: Readable, $($t: Readable), *> Readable for ($t0, $($t,)*) {
            fn read() -> Self {
                (read(), $(read::<$t>(),)*)
            }
        }

        impl<$t0: Printable, $($t: Printable), *> Printable for ($t0, $($t,)*) {
            fn print(self: &Self) {
                #[allow(non_snake_case)]
                let (ref $t0, $(ref $t,)*) = &self;
                $t0.print();
                $(
                    $t.print();
                )*
            }
        }

        impl_rp_tuple!{$($t,) *}
    };
}

impl<T: Printable> Printable for Vec<T> {
    fn print(self: &Self) {
        for x in self {
            x.print();
        }
    }
}

impl<T: Printable> Printable for [T] {
    fn print(self: &Self) {
        for x in self {
            x.print();
        }
    }
}

impl_rp_tuple! {T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,}

pub fn read<T: Readable>() -> T {
    T::read()
}

pub fn readv<T: Readable>(size: usize) -> Vec<T> {
    let mut res = Vec::with_capacity(size);
    for _ in 0..size {
        res.push(read());
    }
    res
}

pub fn readb() -> Vec<u8> {
    let s: String = read!();
    s.as_bytes().into_iter().cloned().collect()
}

/*** RECURSIVE LAMBDA ***/

macro_rules! recursive_fn {
    () => {};
    ($name0:ident $trait0:ident $_:ident $__:ident, $($name:ident $trait:ident $Arg:ident $arg:ident,)*) => {
        pub trait $trait0<$($Arg,)* Output> {
            fn call(&mut self, $($arg: $Arg,)*) -> Output;
        }

        pub struct $name0<F, $($Arg,)* Output>
        where
            F: FnMut(&mut dyn $trait0<$($Arg,)* Output>, $($Arg,)*) -> Output,
        {
            f: std::cell::UnsafeCell<F>,
            $(
                $arg: PhantomData<$Arg>,
            )*
            phantom_output: PhantomData<Output>,
        }

        impl<F, $($Arg,)* Output> $name0<F, $($Arg,)* Output>
        where
            F: FnMut(&mut dyn $trait0<$($Arg,)* Output>, $($Arg,)*) -> Output,
        {
            pub fn new(f: F) -> Self {
                Self {
                    f: std::cell::UnsafeCell::new(f),
                    $(
                        $arg: PhantomData,
                    )*
                    phantom_output: PhantomData,
                }
            }
        }

        impl<F, $($Arg,)* Output> $trait0<$($Arg,)* Output> for $name0<F, $($Arg,)* Output>
        where
            F: FnMut(&mut dyn $trait0<$($Arg,)* Output>, $($Arg,)*) -> Output,
        {
            fn call(&mut self, $($arg: $Arg,)*) -> Output {
                unsafe { (&mut *self.f.get())(self, $($arg,)*) }
            }
        }

        recursive_fn!{$($name $trait $Arg $arg,)*}
    };
}

recursive_fn! {
    RecursiveFn11 Callable11 Arg11 arg11,
    RecursiveFn10 Callable10 Arg10 arg10,
    RecursiveFn9 Callable9 Arg9 arg9,
    RecursiveFn8 Callable8 Arg8 arg8,
    RecursiveFn7 Callable7 Arg7 arg7,
    RecursiveFn6 Callable6 Arg6 arg6,
    RecursiveFn5 Callable5 Arg5 arg5,
    RecursiveFn4 Callable4 Arg4 arg4,
    RecursiveFn3 Callable3 Arg3 arg3,
    RecursiveFn2 Callable2 Arg2 arg2,
    RecursiveFn1 Callable1 Arg1 arg1,
    RecursiveFn0 Callable0 Arg0 arg0,
}

/*** MOD ***/

// gcd, x, y
pub fn extended_gcd(a: i64, b: i64) -> (i64, i64, i64) {
    if a == 0 {
        (b, 0, 1)
    } else {
        let (g, y, mut x) = extended_gcd(b % a, a);
        x -= (b / a) * y;
        (g, x, y)
    }
}

pub trait HasConstVal {
    const VAL: i64;
}

// const of V has to be prime
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct ModBase<M: HasConstVal + Copy> {
    v: i64,
    phantom: PhantomData<M>,
}

impl<M: HasConstVal + Copy> ModBase<M> {
    pub fn new(mut v: i64) -> Self {
        v %= M::VAL;
        if v < 0 {
            v = v + M::VAL;
        }
        Self {
            v,
            phantom: PhantomData,
        }
    }

    pub fn inv(&self) -> Self {
        let (_, x, _) = extended_gcd(self.v, M::VAL);
        Self::new(x)
    }

    pub fn pow(&self, n: usize) -> Self {
        let v = self.v;
        let mut res = Self::new(1);
        for _ in 0..n {
            res *= v;
        }
        res
    }
}

impl<M: HasConstVal + Copy> ops::Add<i64> for ModBase<M> {
    type Output = Self;

    fn add(self, rhs: i64) -> Self {
        Self::new(self.v + rhs)
    }
}

impl<M: HasConstVal + Copy> ops::Add for ModBase<M> {
    type Output = Self;

    fn add(self, rhs: Self) -> Self {
        Self::new(self.v + rhs.v)
    }
}

impl<M: HasConstVal + Copy> ops::AddAssign<i64> for ModBase<M> {
    fn add_assign(&mut self, rhs: i64) {
        self.v = (self.v + rhs) % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::AddAssign for ModBase<M> {
    fn add_assign(&mut self, rhs: Self) {
        self.v = (self.v + rhs.v) % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::Sub<i64> for ModBase<M> {
    type Output = Self;

    fn sub(self, rhs: i64) -> Self {
        Self::new(self.v - rhs)
    }
}

impl<M: HasConstVal + Copy> ops::Sub for ModBase<M> {
    type Output = Self;

    fn sub(self, rhs: Self) -> Self {
        Self::new(self.v - rhs.v)
    }
}

impl<M: HasConstVal + Copy> ops::SubAssign<i64> for ModBase<M> {
    fn sub_assign(&mut self, rhs: i64) {
        self.v = (self.v - rhs) % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::SubAssign for ModBase<M> {
    fn sub_assign(&mut self, rhs: Self) {
        self.v = (self.v - rhs.v) % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::Mul<i64> for ModBase<M> {
    type Output = Self;

    fn mul(self, rhs: i64) -> Self::Output {
        Self::new(self.v * rhs)
    }
}

impl<M: HasConstVal + Copy> ops::Mul for ModBase<M> {
    type Output = Self;

    fn mul(self, rhs: Self) -> Self::Output {
        Self::new(self.v * rhs.v)
    }
}

impl<M: HasConstVal + Copy> ops::MulAssign<i64> for ModBase<M> {
    fn mul_assign(&mut self, rhs: i64) {
        self.v = self.v * rhs % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::MulAssign for ModBase<M> {
    fn mul_assign(&mut self, rhs: Self) {
        self.v = self.v * rhs.v % M::VAL;
    }
}

impl<M: HasConstVal + Copy> ops::Div<i64> for ModBase<M> {
    type Output = Self;

    fn div(self, rhs: i64) -> Self::Output {
        self * Self::new(rhs).inv()
    }
}

impl<M: HasConstVal + Copy> ops::Div for ModBase<M> {
    type Output = Self;

    fn div(self, rhs: Self) -> Self::Output {
        self * rhs.inv()
    }
}

impl<M: HasConstVal + Copy> ops::DivAssign<i64> for ModBase<M> {
    fn div_assign(&mut self, rhs: i64) {
        self.v = (Self::new(self.v) / rhs).v;
    }
}

impl<M: HasConstVal + Copy> ops::DivAssign for ModBase<M> {
    fn div_assign(&mut self, rhs: Self) {
        self.v = (Self::new(self.v) / rhs).v;
    }
}

impl<M: HasConstVal + Copy> ops::Neg for ModBase<M> {
    type Output = Self;

    fn neg(self) -> Self::Output {
        Self::new(-self.v)
    }
}

impl<M: HasConstVal + Copy> ops::Deref for ModBase<M> {
    type Target = i64;

    fn deref(&self) -> &Self::Target {
        &self.v
    }
}

#[macro_export]
macro_rules! Mod {
    ($val: expr) => {
        Mod!(Mod, ModV, $val);
    };
    ($name: ident, $v_name: ident, $val: expr) => {
        #[derive(Copy, Clone, Eq, PartialEq)]
        pub struct $v_name {}

        impl crate::HasConstVal for $v_name {
            const VAL: i64 = $val as i64;
        }

        type $name = ModBase<$v_name>;
    };
}


#![allow(dead_code, unused_macros, unused_imports)]
use std::{cell::{Cell, RefCell, UnsafeCell}, cmp::{Ordering, Reverse, max, min}, collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque, hash_map::{DefaultHasher, RandomState}}, error::Error, fmt::{Display, Write as FmtWrite}, hash::{BuildHasher, Hash, Hasher}, io::{BufWriter, Read, Stdin, Stdout, Write}, iter::{FromIterator, Peekable}, mem::swap, ops::*, process::exit, rc::Rc, str::{FromStr, from_utf8_unchecked}, time::{Duration, Instant}, convert::{TryInto, TryFrom}, marker::PhantomData};

const IO_BUF_SIZE: usize = 1 << 16;
type Input = Scanner<Stdin>;
type Output = BufWriter<Stdout>;
fn _init_input() -> Input { Scanner::new(std::io::stdin()) }
fn _init_output() -> Output { BufWriter::with_capacity(IO_BUF_SIZE, std::io::stdout()) }

#[repr(transparent)] struct Unsync<T>(T);
unsafe impl<T> Sync for Unsync<T> {}

type BadLazy<T> = Unsync<UnsafeCell<Option<T>>>;
impl<T> BadLazy<T> {
    const fn new() -> Self { Self(UnsafeCell::new(None)) }
}

static INPUT: BadLazy<Input> = BadLazy::new();
static OUTPUT: BadLazy<Output> = BadLazy::new();

fn inp<F: FnOnce(&mut Input) -> R, R>(f: F) -> R {
    unsafe { f((&mut *INPUT.0.get()).get_or_insert_with(_init_input)) }
}
fn out<F: FnOnce(&mut Output) -> R, R>(f: F) -> R {
    unsafe { f((&mut *OUTPUT.0.get()).get_or_insert_with(_init_output)) }
}

macro_rules! read {
    () => { read() };
    ($t: ty) => { read::<$t>() };
    ($t: ty, $($tt: ty),*) => { (read::<$t>(), $(read::<$tt>(),)*) };
    [$t: ty; $n: expr] => { read_vec::<$t>($n) };
}
macro_rules! println {
    () => { out(|x| { let _ = writeln!(x); }) };
    ($exp: expr) => { out(|x| { let _ = writeln!(x, "{}", $exp); }) };
    ($fmt: expr, $($arg : tt )*) => { out(|x| { let _ = writeln!(x, $fmt, $($arg)*); }) }
}
macro_rules! print {
    ($exp: expr) => { out(|x| { let _ = write!(x, "{}", $exp); }) };
    ($fmt: expr, $($arg : tt )*) => { out(|x| { let _ = write!(x, $fmt, $($arg)*); }) }
}

fn out_flush() { out(|x| { let _ = x.flush(); }); }

fn input_is_eof() -> bool { inp(|x| x.eof()) }
fn read_byte() -> u8 { inp(|x| x.byte()) }
fn read_bytes_no_skip(n: usize) -> Vec<u8> { inp(|x| x.bytes_no_skip(n)) }
fn read_bytes(n: usize) -> Vec<u8> { inp(|x| x.bytes(n)) }
fn read_bytes2(n: usize, m: usize) -> Vec<Vec<u8>> { inp(|x| x.bytes2(n, m)) }
fn read_token() -> Vec<u8> { inp(|x| x.token_bytes()) }
fn read_token_str() -> String { unsafe { String::from_utf8_unchecked(read_token()) } }
fn read_line() -> Vec<u8> { inp(|x| x.line_bytes()) }
fn read_line_str() -> String { unsafe { String::from_utf8_unchecked(read_line()) } }
fn read<T: FromStr>() -> T { read_token_str().parse::<T>().ok().expect("failed parse") }
fn read_vec<T: FromStr>(n: usize) -> Vec<T> { (0..n).map(|_| read()).collect() }
fn read_vec2<T: FromStr>(n: usize, m: usize) -> Vec<Vec<T>> { (0..n).map(|_| read_vec(m)).collect() }

struct Scanner<R: Read> {
    src: R,
    _buf: Vec<u8>,
    _pt: usize, // pointer
    _rd: usize, // bytes read
}

#[allow(dead_code)]
impl<R: Read> Scanner<R> {
    fn new(src: R) -> Scanner<R> {
        Scanner { src, _buf: vec![0; IO_BUF_SIZE], _pt: 1, _rd: 1 }
    }

    fn _check_buf(&mut self) {
        if self._pt == self._rd {
            self._rd = self.src.read(&mut self._buf).unwrap_or(0);
            self._pt = (self._rd == 0) as usize;
        }
    }

    // returns true if end of file
    fn eof(&mut self) -> bool {
        self._check_buf();
        self._rd == 0
    }

    // filters \r, returns \0 if eof
    fn byte(&mut self) -> u8 {
        loop {
            self._check_buf();
            if self._rd == 0 { return 0; }
            let res = self._buf[self._pt];
            self._pt += 1;
            if res != b'\r' { return res; }
        }
    }

    fn bytes_no_skip(&mut self, n: usize) -> Vec<u8> { (0..n).map(|_| self.byte()).collect() }
    fn bytes(&mut self, n: usize) -> Vec<u8> {
        let res = self.bytes_no_skip(n);
        self.byte();
        res
    }
    fn bytes2(&mut self, n: usize, m: usize) -> Vec<Vec<u8>> { (0..n).map(|_| self.bytes(m)).collect() }

    fn token_bytes(&mut self) -> Vec<u8> {
        let mut res = Vec::new();
        let mut c = self.byte();
        while c <= b' ' {
            if c == b'\0' { return res; }
            c = self.byte();
        }
        loop {
            res.push(c);
            c = self.byte();
            if c <= b' ' { return res; }
        }
    }

    fn line_bytes(&mut self) -> Vec<u8> {
        let mut res = Vec::new();
        let mut c = self.byte();
        while c != b'\n' && c != b'\0' {
            res.push(c);
            c = self.byte();
        }
        res
    }
}

trait JoinToStr {
    fn join_to_str(self, sep: &str) -> String;
    fn concat_to_str(self) -> String;
}
impl<T: Display, I: Iterator<Item = T>> JoinToStr for I {
    fn join_to_str(mut self, sep: &str) -> String {
        match self.next() {
            Some(first) => {
                let mut res = first.to_string();
                while let Some(item) = self.next() {
                    res.push_str(sep);
                    res.push_str(&item.to_string());
                }
                res
            }
            None => { String::new() }
        }
    }

    fn concat_to_str(self) -> String {
        let mut res = String::new();
        for item in self { res.push_str(&item.to_string()); }
        res
    }
}
trait AsStr { fn as_str(&self) -> &str; }
impl AsStr for [u8] { fn as_str(&self) -> &str {std::str::from_utf8(self).expect("attempt to convert non-UTF8 byte string.")} }

macro_rules! veci {
    ($n:expr , $i:ident : $gen:expr) => {{
        let _veci_n = $n;
        let mut _veci_list = Vec::with_capacity(_veci_n);
        for $i in 0.._veci_n {
            _veci_list.push($gen);
        }
        _veci_list
    }};
    ($n:expr , $gen:expr) => { veci!($n, _veci_: $gen) }
}

fn abs_diff<T: Sub<Output = T> + PartialOrd>(x: T, y: T) -> T {
    if x < y { y - x } else { x - y }
}

trait CommonNumExt {
    fn div_ceil(self, b: Self) -> Self;
    fn div_floor(self, b: Self) -> Self;
    fn gcd(self, b: Self) -> Self;
    fn highest_one(self) -> Self;
    fn lowest_one(self) -> Self;
    fn sig_bits(self) -> u32;
}

macro_rules! impl_common_num_ext {
    ($($ix:tt = $ux:tt),*) => {
        $(
            impl CommonNumExt for $ux {
                fn div_ceil(self, b: Self) -> Self {
                    let q = self / b; let r = self % b;
                    if r != 0 { q + 1 } else { q }
                }
                fn div_floor(self, b: Self) -> Self { self / b }
                fn gcd(self, mut b: Self) -> Self {
                    let mut a = self;
                    if a == 0 || b == 0 { return a | b; }
                    let shift = (a | b).trailing_zeros();
                    a >>= a.trailing_zeros();
                    b >>= b.trailing_zeros();
                    while a != b {
                        if a > b { a -= b; a >>= a.trailing_zeros(); }
                        else { b -= a; b >>= b.trailing_zeros(); }
                    }
                    a << shift
                }
                #[inline] fn highest_one(self) -> Self {
                    if self == 0 { 0 } else { const ONE: $ux = 1; ONE << self.sig_bits() - 1 }
                }
                #[inline] fn lowest_one(self) -> Self { self & self.wrapping_neg() }
                #[inline] fn sig_bits(self) -> u32 { std::mem::size_of::<$ux>() as u32 * 8 - self.leading_zeros() }
            }

            impl CommonNumExt for $ix {
                fn div_ceil(self, b: Self) -> Self {
                    let q = self / b; let r = self % b;
                    if self ^ b >= 0 && r != 0 { q + 1 } else { q }
                }
                fn div_floor(self, b: Self) -> Self {
                    let q = self / b; let r = self % b;
                    if self ^ b < 0 && r != 0 { q - 1 } else { q }
                }
                fn gcd(self, b: Self) -> Self {
                    fn w_abs(x: $ix) -> $ux { (if x.is_negative() { x.wrapping_neg() } else { x }) as _ }
                    w_abs(self).gcd(w_abs(b)) as _
                }
                #[inline] fn highest_one(self) -> Self { (self as $ux).highest_one() as _ }
                #[inline] fn lowest_one(self) -> Self { self & self.wrapping_neg() }
                #[inline] fn sig_bits(self) -> u32 { std::mem::size_of::<$ix>() as u32 * 8 - self.leading_zeros() }
            }
        )*
    }
}
impl_common_num_ext!(i8 = u8, i16 = u16, i32 = u32, i64 = u64, i128 = u128, isize = usize);

trait ChMaxMin<T> {
    fn chmax(&mut self, v: T) -> bool;
    fn chmin(&mut self, v: T) -> bool;
}
impl<T: PartialOrd> ChMaxMin<T> for Option<T> {
    fn chmax(&mut self, v: T) -> bool { if self.is_none() || v > *self.as_ref().unwrap() { *self = Some(v); true } else { false } }
    fn chmin(&mut self, v: T) -> bool { if self.is_none() || v < *self.as_ref().unwrap() { *self = Some(v); true } else { false } }
}
impl<T: PartialOrd> ChMaxMin<T> for T {
    fn chmax(&mut self, v: T) -> bool { if v > *self { *self = v; true } else { false } }
    fn chmin(&mut self, v: T) -> bool { if v < *self { *self = v; true } else { false } }
}

// * end commons * //

#[allow(non_snake_case, non_upper_case_globals)]
fn main() {
    let num_cases: usize = 1;//read();

    for _case_num in 1..=num_cases {
        let p1 = read!(usize);
		let t1 = read!(i64);
		let p2 = read!(usize);
		let t2 = read!(i64);
		let h = read!(usize);
		let s = read!(usize);

		let x1 = p1 - s;
		let x2 = p2 - s;
		let x3 = p1 + p2 - s;

		let inf = i64::MAX;
		let mut ans = inf;
		let mut dp = vec![inf; h+1];
		dp[0] = 0;

		for i in 0..h { if dp[i] != inf {
			let t = dp[i];

			let mut k1 = 0;
			let mut k2 = 0;
			let mut dm = 0;
			loop {
				if i + dm >= h {
					ans.chmin(t + max(k1 * t1, k2 * t2));
					break;
				}
				dp[min(h, i+dm+x3)].chmin(t + max((k1+1) * t1, (k2+1) * t2));

				if (k1 + 1) * t1 < (k2 + 1) * t2 {
					k1 += 1;
					dm += x1;
				} else {
					k2 += 1;
					dm += x2;
				}
			}
		}}

		//println!("{:?}", &dp);

		ans.chmin(dp[h]);
		println!(ans);
    }

    out_flush();
}


fn run() {
    input! {
        a: (usize, i64),
        b: (usize, i64),
        e: (usize, usize),
    }
    let inf = std::i64::MAX / 2;
    let mut memo = vec![inf; e.0 + 1];
    for i in 0..=e.0 {
        for j in 0..=e.0 {
            let d = e.0.min(i * (a.0 - e.1) + j * (b.0 - e.1));
            let t = (i as i64 * a.1).max(j as i64 * b.1);
            memo[d] = memo[d].min(t);
        }
    }
    for i in 1..=e.0 {
        for j in 1..=e.0 {
            let t = (i as i64 * a.1).max(j as i64 * b.1);
            let d = (i - 1) * (a.0 - e.1) + (j - 1) * (b.0 - e.1) + a.0 + b.0 - e.1;
            for k in 0..=(e.0 / d + 1) {
                let d = (k * d).min(e.0);
                memo[d] = memo[d].min(t * k as i64);
            }
        }
    }
    for i in (0..e.0).rev() {
        memo[i] = memo[i].min(memo[i + 1]);
    }
    for i in 1..=e.0 {
        let t = memo[i];
        for j in (i + 1)..=e.0 {
            memo[j] = memo[j].min(memo[j - i] + t);
        }
    }
    println!("{}", memo[e.0]);
}

fn main() {
    run();
}

// ---------- begin input macro ----------
// reference: https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[macro_export]
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_export]
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_export]
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 ----------


mod cp {
    #[allow(dead_code)]
    pub mod io {
        use std::io::prelude::*;
        pub trait Parseable: Sized {
            fn parse(p: &mut Parser) -> Option<Self>;
        }
        pub trait ParseableScalar: std::str::FromStr + Sized {}
        impl<T: ParseableScalar> Parseable for T {
            fn parse(p: &mut Parser) -> Option<Self> {
                p.parse_scalar()
            }
        }
        macro_rules ! declare_parseable_scalar { ($ ($ x : ty) ,*) => { $ (impl ParseableScalar for $ x { }) * } }
        declare_parseable_scalar!(
            i8, u8, i16, u16, i32, u32, i64, u64, i128, u128, isize, usize, f32, f64, String
        );
        macro_rules ! impl_parseable_tuple { ($ ($ name : ident) +) => { impl <$ ($ name : Parseable) ,+> Parseable for ($ ($ name ,) +) { fn parse (p : & mut Parser) -> Option < Self > { Some (($ ($ name :: parse (p) ?,) +)) } } } ; }
        impl_parseable_tuple! { A }
        impl_parseable_tuple! { A B }
        impl_parseable_tuple! { A B C }
        impl_parseable_tuple! { A B C D }
        impl_parseable_tuple! { A B C D E }
        impl_parseable_tuple! { A B C D E F }
        impl_parseable_tuple! { A B C D E F G }
        impl_parseable_tuple! { A B C D E F G H }
        impl_parseable_tuple! { A B C D E F G H I }
        impl_parseable_tuple! { A B C D E F G H I J }
        impl_parseable_tuple! { A B C D E F G H I J K }
        impl_parseable_tuple! { A B C D E F G H I J K L }
        impl<T: Parseable, const N: usize> Parseable for [T; N] {
            fn parse(p: &mut Parser) -> Option<Self> {
                let x = [0; N].map(|_| T::parse(p));
                if x.iter().all(Option::<_>::is_some) {
                    Some(x.map(Option::<_>::unwrap))
                } else {
                    None
                }
            }
        }
        pub fn stdin_to_string() -> String {
            let mut content = String::new();
            let stdin = std::io::stdin();
            let mut rd = stdin.lock();
            rd.read_to_string(&mut content).unwrap();
            content
        }
        pub struct Parser<'a> {
            tokens: std::str::SplitWhitespace<'a>,
        }
        impl<'a> Parser<'a> {
            pub fn new(text: &'a str) -> Self {
                Self {
                    tokens: text.split_whitespace(),
                }
            }
            pub fn parse_scalar<T: std::str::FromStr>(&mut self) -> Option<T> {
                self.next().map(|s| match s.parse() {
                    Ok(x) => x,
                    Err(_) => panic!("cannot parse {:?}", s),
                })
            }
            pub fn read_or_eof<T: Parseable>(&mut self) -> Option<T> {
                T::parse(self)
            }
            pub fn read<T: Parseable>(&mut self) -> T {
                self.read_or_eof::<T>().expect("unexpected end-of-file")
            }
        }
        impl<'a> Iterator for Parser<'a> {
            type Item = &'a str;
            fn next(&mut self) -> Option<&'a str> {
                self.tokens.next()
            }
        }
        pub struct ParserWrapper<'a, 'b, T> {
            p: &'b mut Parser<'a>,
            _marker: std::marker::PhantomData<T>,
        }
        impl<'a, 'b, T: Parseable> Iterator for ParserWrapper<'a, 'b, T> {
            type Item = T;
            fn next(&mut self) -> Option<T> {
                self.p.read_or_eof()
            }
        }
        impl<'a> Parser<'a> {
            pub fn iter<'b, T>(&'b mut self) -> ParserWrapper<'a, 'b, T> {
                ParserWrapper::<'a, 'b, T> {
                    p: self,
                    _marker: std::marker::PhantomData {},
                }
            }
        }
    }
}
use cp::io;
use std::cmp::{max, min};
fn main() {
    let content = io::stdin_to_string();
    let mut rd = io::Parser::new(&content);
    let (p1, t1): (i64, i64) = rd.read();
    let (p2, t2): (i64, i64) = rd.read();
    let (h, s): (i64, i64) = rd.read();
    let mut f: Vec<i64> = (0..=h)
        .map(|y| {
            (0..=y)
                .map(|x1| max(x1 * t1, (y - x1 * (p1 - s) + p2 - s - 1) / (p2 - s) * t2))
                .min()
                .unwrap()
        })
        .collect();
    let t: Vec<i64> = (0..=h)
        .map(|y| {
            (1..=y)
                .map(|x1| {
                    [
                        x1 * t1,
                        (y - s - x1 * (p1 - s) + p2 - s - 1) / (p2 - s) * t2,
                        t2,
                    ]
                    .iter()
                    .copied()
                    .max()
                    .unwrap()
                })
                .min()
                .unwrap_or(i64::MIN)
        })
        .collect();
    for i in 1..=(h as usize) {
        for j in 1..=i {
            f[i] = min(f[i], f[i - j] + t[j]);
        }
    }
    println!("{}", f[h as usize]);
}


#![allow(dead_code, unused_macros, unused_imports)]
use std::arch::x86_64::_mm256_undefined_si256;
use std::cell::RefCell;
use std::cmp::Ordering;
use std::collections::*;
use std::error::Error;
use std::fmt::write;
use std::hash::Hash;
use std::io;
use std::io::prelude::*;
use std::io::stderr;
use std::io::StdinLock;
use std::io::StdoutLock;
use std::io::Write;
use std::io::{stdin, stdout, BufRead, BufWriter};
use std::ops::*;
use std::process::id;

macro_rules! fprintvec {
    ($dst:expr, $arg:expr) => {{
        writeln!(
            $dst,
            "{}",
            $arg.iter()
                .map(|x| format!("{} ", x))
                .collect::<Vec<String>>()
                .join(""),
        )
        .ok();
    }};
}

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

    pub fn next_split<T: std::str::FromStr>(&mut self) -> Vec<T> {
        loop {
            let mut v = Vec::new();
            while let Some(token) = self.buf_iter.next() {
                v.push(token.parse().ok().expect("Failed parse"));
            }
            if v.len() > 0 {
                return v;
            }

            self.buf_str.clear();
            self.reader
                .read_until(b'\n', &mut self.buf_str)
                .expect("Failed read");
            self.buf_iter = unsafe {
                let slice = std::str::from_utf8_unchecked(&self.buf_str);
                std::mem::transmute(slice.split_whitespace())
            }
        }
    }
}

// #[derive(Debug, Clone, Default, Copy)]
fn lcm(first: usize, second: usize) -> usize {
    first * second / gcd(first, second)
}

fn gcd(first: usize, second: usize) -> usize {
    let mut max = first;
    let mut min = second;
    if min > max {
        let val = max;
        max = min;
        min = val;
    }

    loop {
        let res = max % min;
        if res == 0 {
            return min;
        }

        max = min;
        min = res;
    }
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let stdout = io::stdout();
    let lock = stdout.lock();
    let stdin = io::stdin();
    let mut ow = io::BufWriter::new(lock);
    let mut scan = Scanner::new(stdin.lock());
    // let n_tests = scan.next::<usize>();
    let n_tests = 1;
    for _t_num in 1..=n_tests {
        let p1 = scan.next::<i64>();
        let t1 = scan.next::<i64>();
        let p2 = scan.next::<i64>();
        let t2 = scan.next::<i64>();
        let h = scan.next::<i64>();
        let s = scan.next::<i64>();

        let mut dp = vec![i64::MAX; h as usize + 1];
        let mut best = i64::MAX;
        dp[0] = 0;
        for th in (0..h) {
            let st = dp[th as usize];
            if st == i64::MAX {
                continue;
            }
            for (src, other) in [((p1, t1), (p2, t2)), ((p2, t2), (p1, t1))] {
                //fire 1 continously
                let d = src.0 - s;
                if d == 0 {
                    continue;
                }
                let d2 = other.0 - s;
                for i in 0..=h {
                    let c2 = (i * src.1) / other.1;
                    let td2 = c2 * d2;
                    let td1 = d * i;
                    if th + td1 + td2 >= h {
                        best = std::cmp::min(best, st + i * src.1);
                        // println!("{} {} {} {} {:?}", best, st, i, c2, src);
                        break;
                    }
                    let dd = (src.0 + other.0) - s;
                    let nt = std::cmp::max((i + 1) * src.1, (c2 + 1) * other.1) + st;
                    if th + td1 + td2 + dd >= h {
                        best = std::cmp::min(best, nt);
                        // println!("b{} {} {} {} {:?}", best, st, i, c2, src);
                    } else {
                        dp[(th + td1 + td2 + dd) as usize] =
                            std::cmp::min(nt, dp[(th + td1 + td2 + dd) as usize]);
                    }
                }
            }
        }
        // writeln!(ow, "{:?}", dp[0]);
        writeln!(ow, "{:?}", best);
        // writeln!(ow, "{}", bops);
    }
    Ok(())
}


// This file is a "Hello, world!" in Rust language for wandbox.
use std::io;

fn main()
{
    let stdin = io::stdin();
    let mut buffer = String::new();
    stdin.read_line(&mut buffer).unwrap();
    buffer = buffer.trim().to_string();
    let mut n = buffer.parse::<u32>().unwrap();
    let mut cnt = 0;
    while n > 0 {
        n >>= 1;
        cnt += 1;
    }

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

// Rust language references:
//   https://www.rust-lang.org/


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

fn main() -> () {
    let mut buffer = String::new();
    let stdin = io::stdin();
    let mut handle = stdin.lock();

    handle.read_to_string(&mut buffer).expect("stdin");

    let arr : Vec<_> = buffer.split_whitespace().map(|x| x.parse::<i64>().unwrap() ).collect();

    let mut n = *arr.iter().nth(0).unwrap();

    let mut curr = 1;
    let mut total = 0;
    let mut count = 0;

    while total < n {
        count += 1;
        total +=  curr;
        curr = curr * 2;
    }

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


//================================================================================
#[allow(unused_imports)] use std::cmp::{max, min, Ordering};
#[allow(unused_imports)] use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)] use std::iter::FromIterator;
use std::io::Write;
static mut GLOBAL_STDIN: *mut std::io::Stdin = 0usize as _;
static mut GLOBAL_STDINLOCK: *mut std::io::StdinLock<'static> = 0usize as _;
static mut GLOBAL_STDOUT: *mut std::io::Stdout = 0usize as _;
static mut GLOBAL_STDOUTLOCK: *mut std::io::StdoutLock<'static> = 0usize as _;
const BUF_SIZE: usize = 1024*1024;
static mut GLOBAL_INPUT_BUF: *mut u8 = 0usize as _;
static mut GLOBAL_INPUT_PTR: *const u8 = 0usize as _;
static mut GLOBAL_INPUT_END: *const u8 = 0usize as _;
fn init() {
    unsafe {
        use std::boxed::Box;
        GLOBAL_STDIN = Box::into_raw(Box::new(std::io::stdin()));
        GLOBAL_STDINLOCK = Box::into_raw(Box::new(GLOBAL_STDIN.as_ref().unwrap().lock()));
        GLOBAL_STDOUT = Box::into_raw(Box::new(std::io::stdout()));
        GLOBAL_STDOUTLOCK = Box::into_raw(Box::new(GLOBAL_STDOUT.as_mut().unwrap().lock()));
        let buf = Box::<[u8]>::into_raw(vec![0u8; BUF_SIZE].into_boxed_slice());
        GLOBAL_INPUT_BUF = (*buf).as_mut_ptr();
        GLOBAL_INPUT_PTR = GLOBAL_INPUT_BUF;
        GLOBAL_INPUT_END = GLOBAL_INPUT_BUF;
    }
}
fn peek() -> u8 { unsafe {
    use std::io::Read;
    if GLOBAL_INPUT_PTR == GLOBAL_INPUT_END {
        let n = GLOBAL_STDINLOCK.as_mut().unwrap().read(std::slice::from_raw_parts_mut(GLOBAL_INPUT_BUF, BUF_SIZE)).expect("I/O error");
        GLOBAL_INPUT_PTR = GLOBAL_INPUT_BUF;
        GLOBAL_INPUT_END = GLOBAL_INPUT_PTR.offset(n as isize);
    }
    *GLOBAL_INPUT_PTR
} }
fn getchar() -> u8 { let c = peek(); unsafe { GLOBAL_INPUT_PTR = GLOBAL_INPUT_PTR.offset(1); } c }
fn ungetc() { unsafe { GLOBAL_INPUT_PTR = GLOBAL_INPUT_PTR.offset(-1); } }
fn skip_whitespaces() { loop { match getchar() as char { ' ' | '\t' | '\n' | '\r' => { }, _ => { ungetc(); break; } } } }
trait FastRead { fn read() -> Self; }
macro_rules! read_int_impl {
    ( $signed:expr, $($T:ident,)* ) => {
        $(impl FastRead for $T {
            fn read() -> $T {
                skip_whitespaces(); let is_negative = if $signed && peek() == '-' as u8 { getchar(); true } else { false }; let mut val: $T = 0;
                loop {
                    let c = getchar(); let d = c.wrapping_sub('0' as u8);
                    if d >= 10 { match c as char {
                        ' ' | '\t' | '\n' | '\r' => { ungetc(); return if is_negative { 0-val } else { val }; },
                        _ => panic!("invalid input character: `{}' (code: {})", c as char, c),
                    }}
                    val = 10*val + (d as $T);
                }
            }
        })*
    };
}
macro_rules! read_tuple_impl {
    ( ) => ();
    ( $a:ident, $($name:ident,)* ) => {
        impl<$a:FastRead, $($name:FastRead),*> FastRead for ($a, $($name,)*) { fn read() -> Self { ( $a::read(), $($name::read()),* ) } }
        read_tuple_impl!($($name,)*);
    }
}
macro_rules! snd_arg_impl { ($a:expr; $e:expr) => { $e }; }
macro_rules! read_array_impl {
    () => {};
    ($len:expr, $($lens:expr,)*) => {
        impl <T: FastRead> FastRead for [T; $len] { fn read() -> Self { [ $(snd_arg_impl!($lens; read::<T>())),* ] } }
        read_array_impl!($($lens,)*);
    };
}
unsafe fn extend_vec(v: &mut Vec<u8>, first: *const u8, last: *const u8) {
    let len = usize::wrapping_sub(last as _, first as _);
    v.extend_from_slice(&std::slice::from_raw_parts(first, len));
}
macro_rules! read_string_inplace {
    ($func:ident, $($pattern:pat)|+) => {
        #[allow(unused)] fn $func(s: &mut String) -> bool {
            skip_whitespaces();
            unsafe { let mut ptr = GLOBAL_INPUT_PTR; let end = GLOBAL_INPUT_END; let v = s.as_mut_vec(); v.clear();
                     loop {
                         if ptr == end { extend_vec(v, GLOBAL_INPUT_PTR, end); GLOBAL_INPUT_PTR = GLOBAL_INPUT_END; peek(); ptr = GLOBAL_INPUT_PTR; }
                         match *ptr as char {
                             $($pattern)|+ => { extend_vec(v, GLOBAL_INPUT_PTR, ptr); GLOBAL_INPUT_PTR = ptr; return v.is_empty(); }
                             _ => { ptr = ptr.offset(1); }
                         }
                     }
            }
        }
    };
}
read_string_inplace!(getword, ' ' | '\t' | '\n' | '\r');
read_string_inplace!(getline, '\n');
#[allow(unused)] fn read_line() -> String { let mut s = String::new(); getline(&mut s); s }
impl FastRead for String { fn read() -> String { let mut s = String::new(); getword(&mut s); s } }
impl FastRead for char { fn read() -> char { skip_whitespaces(); getchar() as char } }
read_int_impl!(false, u8, u16, u32, u64, usize,);
read_int_impl!(true,  i8, i16, i32, i64, isize,);
read_tuple_impl!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,);
read_array_impl!(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,);
#[allow(dead_code)] fn read<T: FastRead>() -> T { T::read() }
#[allow(unused_macros)] macro_rules! print   { ($($arg:tt)*) => { write!  (unsafe { GLOBAL_STDOUTLOCK.as_mut().unwrap() }, $($arg)*).unwrap() } }
#[allow(unused_macros)] macro_rules! println { ($($arg:tt)*) => { writeln!(unsafe { GLOBAL_STDOUTLOCK.as_mut().unwrap() }, $($arg)*).unwrap() } }
#[allow(dead_code)] fn read_vec<T: FastRead>(n: usize) -> Vec<T> { let mut v = Vec::with_capacity(n); for _ in 0..n { v.push(read()); } v }
#[allow(dead_code)] fn print_iter<I: Iterator<Item=T>, T: std::fmt::Display>(iter: I) { let mut iter = iter; if let Some(x) = iter.next() { print!("{}", x); for x in iter { print!(" {}", x); } } println!(""); }
#[allow(dead_code)] fn print_vec<T: std::fmt::Display>(v: &Vec<T>) { print_iter(v.iter()); }
#[allow(unused_macros)] macro_rules! debug { ($a:expr, $($b:expr),*) => (if cfg!(debug_assertions) { println!(concat!("DEBUG: ", stringify!($a), " = {:?}", $(", ", stringify!($b), " = {:?}"),*), $a, $($b),*); } ) }
//================================================================================

fn main() {
    init();
    let n: u64 = read();
    let mut k=1u64;
    while (1u64<<k)-1 < n {
        k += 1;
    }
    println!("{}", k);
}


use std::io;
use std::cmp::max;

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 count = readln!(i32);
    let votes = readvec!(i32);
    let votes_max = *votes.iter().max().unwrap();
    let votes_sum : i32 = votes.iter().sum();

    println!("{}", max(votes_max, 2 * votes_sum / count + 1));
}


#![allow(unused_variables)]
#![allow(unused_must_use)]
#![allow(unused_imports)]
#![allow(non_snake_case)]
#![allow(dead_code)]

use std::u64;
use std::io;
use std::cmp;
use std::io::prelude::*;
use std::fs::File;
use std::collections::HashSet;

use std::str::FromStr;

fn solve(sum: i64, max: i64, n: i64) -> i64 {
    let mut ans = 2 * sum / n;
    while 2 * sum >= ans * n {
        ans += 1;
    }

    cmp::max(max, ans)
}

fn main() {
    let stdin = io::stdin();
    let stdout = io::stdout();
    let stderr = io::stderr();

    //let r = &mut io::BufReader::new(File::open("input.txt").unwrap()).lines();
    let r = &mut io::BufReader::new(stdin.lock()).lines();
    let w = &mut io::BufWriter::new(stdout.lock());
    let e = &mut io::BufWriter::new(stderr.lock());

    let n: usize = read_var(r);
    let a: Vec<i64> = read_vec(r);
    let mut sum: i64 = 0;
    let mut max: i64 = 0;
    for ai in a.into_iter() {
        sum += ai;
        max = cmp::max(max, ai);
    }

    // writeln!(e, "sum: {}, max: {}", sum, max);
    writeln!(w, "{}", solve(sum, max, n as i64));
}

fn to_vec<T: FromStr>(res: io::Result<String>) -> Vec<T> {
    res.unwrap().split(' ').map(|x| x.trim().parse().ok().unwrap()).collect()
}

fn read_vec<T: FromStr, R: BufRead>(r: &mut io::Lines<R>) -> Vec<T> {
    to_vec(r.next().unwrap())
}

fn read_var<T: FromStr, R: BufRead>(r: &mut io::Lines<R>) -> T {
    r.next().unwrap().unwrap().trim().parse().ok().unwrap()
}


use std::io::prelude::*;
use std::io;

fn main() {
    let sin = io::stdin();
    let mut f = sin.lock();
    let mut buf = String::new();
    f.read_line(&mut buf).unwrap();
    let n: usize = buf.trim().parse().unwrap();
    buf = "".to_string();
    f.read_line(&mut buf).unwrap();
    let a: Vec<usize> = buf.split_whitespace().map(|s| s.parse().unwrap()).collect();
    let mut mx: usize = a[0];
    let mut sum: usize = 0;
    for p in a.iter() {
        sum += *p;
        if *p > mx {
            mx = *p;
        }
    }

    let mut k = mx;
    loop {
        let tot = (k * n) - sum;
        if tot > sum {
            break;
        }
        k += 1;
    }

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


fn max(a: i32, b: i32) -> i32
{
    if (a > b) {a} else {b}
}

fn main()
{
    let n: i32;
    let mut s = String::new();
    std::io::stdin().read_line(&mut s);
    n = s.trim().parse().unwrap();
    s = String::new();
    std::io::stdin().read_line(&mut s);
    let a: Vec<&str> = s.trim().split(" ").collect();
    let mut s = 0;
    let mut mx = 0;
    for i in a
    {
        let c = i.to_string().parse::<i32>().unwrap();
        s += c;
        mx = max(mx, c);
    }
    let ans = (2 * s + 1) / n + if (2 * s + 1) % n == 0 {0} else {1};
    println!("{}", max(mx, ans));
}


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

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

    let n = input.u();
    let mut a = std::collections::HashMap::<i32,i32>::new();
    for _ in 0..n {
        let x = input.i();
        let k = 1 + if let Some(&k) = a.get(&x) { k } else { 0 };
        a.insert(x, k);
    }
    let sol = a.into_iter().map(|(_,k)| k).max().unwrap();
    println!("{}", sol);
}


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

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

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

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

fn main() {
  readln!();
  let mut s = readvec!(i32);
  s.sort();
  let gg = String::new();
  let mut res = vec![];
  let mut i = 0;
  while i < s.len() {
    let fr = i;
    while i < s.len() && s[i] == s[fr] {
      i+=1;
    }
    res.push(i-fr);
  }
  println!("{:?}",res.iter().max().unwrap());
}


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 mut arr = [0usize; 101];
    let mut res = 0;
    for _ in 0..n {
        let current: usize = scan.next();
        arr[current] += 1;
        res = res.max(arr[current]);
    }
    println!("{}", res);
}

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


fn main() {
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).expect("INPUT::read line failed");

    let amount = input.trim().parse::<usize>().expect("AMOUNT::parse to usize failed");
    input.clear();

    std::io::stdin().read_line(&mut input).expect("INPUT::read line failed");
    let mut input = input.trim().split(' ');

    let mut vec = vec![i32::default();100];

    for _i in 0..amount  {
        let index = input.next().unwrap().parse::<usize>().unwrap();
        vec[index - 1] += 1;
    }

    let mut max = i32::default();
    for item in vec.iter() {
        if *item > max {
            max = *item;
        }

    }

    println!("{}", max);

}


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

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

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

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

use std::f64;

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

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

const MAX:usize = 30;
const INF:i64 = std::i64::MAX;
const MOD:i64 = 1e9 as i64 + 7;

struct Graph {
    e: Vec<Vec<usize>>,
    v: Vec<usize>,
    u: Vec<usize>,
    f: Vec<bool>,
    c: i64,
    vc: Vec<i64>,
}

impl Graph {
    fn new(n:usize) -> Self {
        Graph {
            e: vec![vec![];n],
            v: vec![],
            u: vec![n;n],
            f: vec![false;n],
            c: 0,
            vc: vec![0;n],
        }
    }

    fn dfs(&mut self, crt: usize) {
        if self.f[crt] { return; }
        self.c += 1;
        self.f[crt] = true;
        self.v.push(crt);
        self.vc[crt] = self.c;
        self.u[crt] = self.v.len()-1;
        for i in 0..self.e[crt].len() {
            self.dfs(self.e[crt][i]);
        }
        //debug!(crt, self.c, self.vc[crt]);
        self.vc[crt] = self.c - self.vc[crt];
    }
}

fn main() {
    //let t:usize = read();
    //'outer: for _ in 0..t {
        let n:usize = read();
        let a:Vec<i64> = (0..n).map(|_| read()).collect();

        let mut map = HashMap::new();
        let mut ans = 0;
        for e in a {
            let cnt = map.entry(e).or_insert(0);
            *cnt += 1;
            ans = max(*cnt, ans);
        }

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

/*

*/


use std::io;

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

    io::stdin().read_line(&mut v).expect("read error");

    let v = v.split_whitespace()
        .map(|x| x.parse::<u128>().expect("parse error"))
        .collect::<Vec<u128>>();

    let n = v[0];

    let x = v[1];

    let mut ans: u128 = 0;

    for i in 1..=n {
        if x % i == 0 && x <= i * n {
            ans += 1;
        }
    }

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


// {{{ by shik

use std::io;

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

#[allow(unused_macros)]
macro_rules! R {
    ( $ty:ty, ... ) => {
        gets().split_whitespace().map(|x| x.parse::<$ty>().unwrap()).collect::<Vec<_>>()
    };
    ( $($ty:ty),* ) => {{
        let line = gets();
        let mut it = line.split_whitespace();
        ( $(it.next().unwrap().parse::<$ty>().unwrap(),)* )
    }}
}

#[allow(unused_macros)]
macro_rules! W {
    ( $x:expr ) => {{
        println!("{}", $x);
    }};
    ( $x:expr, $($xs:expr),* ) => {{
        print!("{} ", $x);
        W!($($xs),*);
    }}
}

#[allow(unused_macros)]
macro_rules! join {
    ($x:expr, $($xs:expr),*; $sep:expr) => { concat!($x, $($sep, $xs),*) }
}

#[allow(unused_macros)]
macro_rules! dump {
    ($($x:expr),*) => {
        eprintln!(join!($(concat!(stringify!($x), " = {:?}")),*; ", "), $($x),*);
    }
}

// }}}

fn main() {
    let (n, x) = R!(usize, usize);
    println!("{}", (1..(n+1)).filter(|i| x % i == 0 && x / i <= n).count());
}


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

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,x) = readln!(i64,i64);
    let mut res = 0;
    for i in 1..(n+1) {
        if x%i == 0 && x/i <= n{
            res += 1;
        }
    }
    println!("{}",res);
}


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

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

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

// Functions

// Main
fn main() {

    input! {
        N: usize,
        X: usize
    }

    let mut ans = 0;
    for i in 1..N+1{
        if X%i==0 && X/i<=N {
            ans += 1;
        }
    }

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


// Vicfred
// https://codeforces.com/problemset/problem/577/A
use std::io;

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

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

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

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

    let limit: i64 = f64::sqrt(x as f64) as i64;

    let mut ans = 0;

    for d in 1..=limit {
        if x%d == 0 && d <= n && x/d <= n {
            ans += 1;
        }
    }

    if x != 1 {
        ans *= 2;
    }

    if limit*limit == x && x != 1 && ans > 0 {
        ans -= 1;
    }

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


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 x: usize = scan.next();
    let mut result: usize = 0;
    for i in 1..=n {
        if x/i <= n && x%i == 0 { result+=1; }
    }
    println!("{}", result);
}

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


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

fn main() {
    let (n, x) = input_pair();
    let mut occurance_count = 0;

    if n == 1 {
        if x == 1 {
            println!("1");
        } else {
            println!("0");
        }
    } else if n == 2 {
        if x == 1 || x == 4 {
            println!("1");
        } else if x == 2 {
            println!("2");
        } else {
            println!("0");
        }
    } else if x == 1 {
        println!("1");
    } else {
        for i in 2..=n {
            if x % i == 0 && x / i <= n {
                if x == i {
                    occurance_count += 2;
                } else {
                    occurance_count += 1;
                }
            }
        }
        println!("{}", occurance_count);
    }
}


//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 x = input.i();
    let sol = (1..(n+1)).filter(|a| x % a == 0 && x / a <= n).count();
    println!("{}", sol);
}