A, B = int, raw_input().split() price = [] for i in range(1, A+1): for j in range(1, B+1): yen = i + j*5 if yen not in price: price.append(yen) print len(price)