The Good, the Bad and the Ugly (1966)

A bounty hunting scam joins two men in an uneasy alliance against a third in a race to find a fortune in gold buried in a remote cemetery. Starring Clint Eastwood, Eli Wallach, Lee Van Cleef. Director Sergio Leone. (Part three from the Dollar Trilogy)
The Good, the Bad and the Ugly (1966) on IMDb