Problem:
Score: 100 points

Problem Statement

There is a train going from Station A to Station B that costs X yen (the currency of Japan).

Also, there is a bus going from Station B to Station C that costs Y yen.

Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus.

How much does it cost to travel from Station A to Station C if she uses this ticket?

Constraints

1 \leq X,Y \leq 100

Y is an even number.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If it costs x yen to travel from Station A to Station C, print x.

Sample Input 1

81 58

Sample Output 1

110

The train fare is 81 yen.

The train fare is 58 ⁄ 2=29 yen with the 50% discount.

Thus, it costs 110 yen to travel from Station A to Station C.

Sample Input 2

4 54

Sample Output 2

31

Solution in Rust (1.15.1) (judge verdict: Runtime Error)

// line io: https://gist.github.com/hebiyan/cb56a7c7eb7c210ce562
use std::cmp::Ordering;

fn compute_temprature(A:f64, T:f64, H: Vec<&str>) -> Vec<f64> {
    // let mut idx_rasidual: Vec<(usize,u32)> = vec![];
    let mut rasidual: Vec<f64> = vec![];
    for (i, item) in H.iter().enumerate() {
        let h: f32 = item.parse().unwrap_or(0.0);
        // idx_rasidual.push((i, T - (h*0.006) as f64));
        rasidual.push((A - T - (h*0.006) as f64).abs())
    }
    // idx_rasidual
    rasidual
}

fn main() {
    let scan = std::io::stdin();
    let mut line = String::new();
    let _ = scan.read_line(&mut line);
    let vec: Vec<&str> = line.split_whitespace().collect();
    let N:f64 = vec[0].parse().unwrap_or(0.0);

    let scan = std::io::stdin();
    let mut line = String::new();
    let _ = scan.read_line(&mut line);
    let vec: Vec<&str> = line.split_whitespace().collect();
    let T:f64 = vec[0].parse().unwrap_or(0.0);
    let A:f64 = vec[1].parse().unwrap_or(0.0);


    let scan = std::io::stdin();
    let mut line = String::new();
    let _ = scan.read_line(&mut line);
    let H: Vec<&str> = line.split_whitespace().collect();
    
    let rasidual = compute_temprature(A, T, H);

    // println!("{}", rasidual.iter().map(|(x, y)| (y, x)).min());
    let index_of_min: Option<usize> = rasidual
        .iter()
        .enumerate()
        .min_by(|&(_, a), &(_, b)| a.partial_cmp(b).unwrap_or(Ordering::Equal))
        .map(|(index, _)| index);

    println!("{}", index_of_min.unwrap()+1);
}