fn main()

in contests/arc069/arc069_a.rs [6:21]


fn main() {
    input! {
        S: usize,
        C: usize
    }

    let mut s = S;
    if S * 2 > C {
        s = C / 2;
    }

    let remaining_c = C - s * 2;
    let total = s + remaining_c / 4;

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