It depends how comformtable you are in the language. I won't go to some old lady in Russia and say "Твою м**!", because she will die of a heart attack. If people think you are a foreigner they are more forgiving with swear words, but if they think that you speak well enough russian to converse, they might not be so forgiving...