F:=proc(m,n) option remember: if m<0 or n<0 then 0: elif m=0 or n=0 then 1: else F(m-1,n)+F(m,n-1)+F(m-1,n-1): fi: end: