Diah Permata Megawati Setiawati Soekarnoputri ( born January 23 , 1947 ) , was President of Indonesia from July 2001 to October 20 , 2004 . ( born 23 January 1947 ) , also known simply as Megawati , is an Indonesian politician , and leader of the opposition party PDI-P . She served as the President of Indonesia from 23 July 2001 to 20 October 2004 .