kill(all);

van=facebook.com/LearningCalculus;

pagesWith1Digits:9*1;

pagesWith2Digits:(99-pagesWith1Digits);

852 = pagesWith3Digits*3+pagesWith2Digits*2+pagesWith1Digits;

pagesWith3Digits:rhs(first(solve(%,pagesWith3Digits)));

num_pages = pagesWith3Digits+pagesWith2Digits + pagesWith1Digits;