Miley Cyrus had some words of wisdom for fellow pop star Justin Bieber when she chatted with Jay Leno on the Tonight Show.

Leno asked the Wrecking Ball singer if she had advice to Bieber, who is facing no less than three separate legal woes: an alleged egging incident, his DUI, and assault charges in Canada.

"You've got a lot of money… Pay people to make sure you don't get in trouble and party at your house, buy a house, and add a club to it," Cyrus said to cheers of approval from the audience.

When the talk show host asked if Miley had any Bieber-like regrets from her teen days, she said she takes pride in the fact that she obeys the law. "It's funny because today, my fans put all these people's mug shots up, and they were like, 'I don't see a Miley mug shot yet!'

"I get the most flak of anybody. I'm not doing anything illegal! I'm doing a lot of s--t," she continued before catching herself and apologizing for her swear, which drew laughs from the audience. "But I'm not doing anything illegal! So that's all right. Everything I do is legal in California."