But he said immigration was a "great concern" among UK voters and squaring this with access to the EU single market would be a "huge challenge".
Germany's Angela Merkel said the EU must "respect the result" of the vote.
But German politicians have insisted the UK cannot "cherry-pick" aspects of the EU.
Earlier on Tuesday, Chancellor Merkel said the UK must accept free movement if it wanted to retain access to the single market.
Mrs Merkel said the Brexit vote had been discussed "very intensively and deeply" at the dinner meeting with EU leaders.
"We all regretted the result and made clear that the legal procedure must be that the UK invokes Article 50.
"Mr Cameron said he would hand it over to the new government to do... we all agreed that before that point, there can be no formal or informal negotiations