According to regular European low, which is in power in Montenegro too, you have right to stay 3 months during 6 months period, so, if you are continuously 3 months in Montenegro, you will need to spend 3 months outside, and then to come back on 3 months again.... Other option is to get permit for long therm vise, by job, studies etc.