Gacega had p bags of rice. She donated 10 bags to a children home. She was left with 35 bags. Find the value of p.