#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc128_a


a, p = map(int, input().strip().split())
res = (a * 3 + p) // 2
print(res) a, p = map(int, input().strip().split()) a map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split p res = (a * 3 + p) // 2 res (a * 3 + p) // 2 a * 3 + p a * 3 a 3 p 2 print(res) print res res = (a * 3 + p) // 2 (a * 3 + p) // 2 res a, p = map(int, input().strip().split()) map(int, input().strip().split()) a p = map(int, input().strip().split()) map(int, input().strip().split()) p
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc128_a


a, p = map(int, input().strip().split())
res = (a * 3 + p) // 2
print(res)
