The Danube then flows southeast for about 2730 kilometers , passing through four capital cities (Vienna, Bratislava, Budapest, and Belgrade) before emptying into the Black Sea via the Danube Delta in Romania and Ukraine.