#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    n, x = [int(i) for i in input().split()]
    result = n + (x * 2) + (x // 2) * 3
    print(result)
    
if __name__ == '__main__':
    main()
