Sequential Learning in the Dense Associative Memory