The present invention relates to novel acylaminocycloalkyl compounds, in particular to the compounds of the formula (I) as described herein and to their salts and N-oxides. The compounds possess valuable therapeutic properties and are suitable, in particular, for treating diseases that respond to modulation of the dopamine D3 receptor. In formula (I), the variables have the following meanings: m is 1 or 2, n is 1 or 2, A is selected from the group consisting of CH