try:
    a,p=map(int, input().split())
    assert 0<=a,p<=100
    print(((a*3)+p)//2)
except AssertionError:
    print('') try:
    a,p=map(int, input().split())
    assert 0<=a,p<=100
    print(((a*3)+p)//2)
except AssertionError:
    print('') except AssertionError:
    print('') print('') print '' a,p=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p assert 0<=a,p<=100 0<=a 0 a p<=100 p 100 print(((a*3)+p)//2) print ((a*3)+p)//2 (a*3)+p a*3 a 3 p 2 p=map(int, input().split()) map(int, input().split()) p a,p=map(int, input().split()) map(int, input().split()) a
try:
    a,p=map(int, input().split())
    assert 0<=a,p<=100
    print(((a*3)+p)//2)
except AssertionError:
    print('')
