Do you think it makes sense to invest in the cloud mining of bitcoin now?
No, it doesn't (has been like that for a long time) plus investing in cloud mining, is equal to giving money to scammers (in most cases).
There are a lot of cloud services with reputation, so I use them and they are paying. Moreover, there are some resources that monitoring scammers and other bad guys. I am checking them everyday.
But I'm asking about amount of investment to cloud mining to be in plus every time. Is there any formula or function, which allow me to find out which amount of investment can bring me most advantage?
If we are referring to reputation here, then there are still some of them, but if we are referring to the idea of cloud mining in general being profitable, then I will affirmatively say it sucks because none is profitable at all. There is no amount you want to invest that would still pay you in the long run and if you cannot invest in miners yourself and join a pool, or go solo if you have the bucks, then you are only going to end up wasting your funds with any cloud mining, either reputable or not.