A strengthening of Freiman's 3k-4 theorem