An economic model of voting behavior