It only lasted two weeks on top before being knocked off by another single from Apple , Mary Hopkin 's " Those Were the Days " ( a song which , incidentally , if not penned was actually produced by McCartney ) .