A 70-year-old man presents with a 6-month history of progressive dysphagia, initially to solids and now to liquids. He also reports unintentional weight loss of 5kg. He is an ex-smoker with a 30 pack-year history and drinks 20 units of alcohol per week. What is the most appropriate initial investigation?