#![allow(unused)]

use std::cmp::{max, min};
use std::io::stdin;
use std::str::FromStr;

fn input<T: FromStr>() -> Result<T, T::Err> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim().parse()
}

fn input_vec<T: FromStr>() -> Result<Vec<T>, T::Err> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim()
        .split_ascii_whitespace()
        .map(|x| x.parse())
        .collect()
}

fn main() {
    let (a, p): (usize, usize) = {
        let tmp = input_vec().unwrap();
        (tmp[0], tmp[1])
    };

    let p = p + 3 * a;
    let ans = p / 2;
    println!("{}", ans);
}
