Let $A$ be a free Abelian monoid generated by the elements $\{a_n| n\in\mathbb{Z},n\geq 0\}$, i.e. a generic element of $A$ is a formal (finite) linear combination of $\{a_n| n\in\mathbb{Z},n\geq 0\}$ with non-negative integer coefficients, e.g. $2a_1+5a_4+3a_5$. Define a multiplication "$\times$" on $A$ as $$a_m\times a_n=f(m,n)a_{m+n},$$ where $f(m,n)$ are non-negative integer coefficients. I want to find all such functions $f(m,n)$ such that "$\times$" is commutative, unital (with multiplicative unit $a_0$), and associative, i.e. $f(m,n)$ satisfies:
(1). $f(m,n)=f(n,m), \forall m,n\geq 0$;
(2). $f(0,n)=1,\forall n\geq 0$;
(3). $f(m,n)f(m+n,p)=f(n,p)f(m,n+p),\forall m,n,p\geq 0$.
Apparently, $f(m,n)\equiv 1$ trivially satisfies all above. My question is, are there any solutions beyond this trivial one?
Note that I could have let $A$ to be a free Abelian group (or even a vector space over a field $F$) generated by the same elements and allow $f(m,n)$ to take integer values (or values in $F$ for the case of $A$ being a vector space), and then I can ask the same question. But let's solve the monoid case first.