from typing import Dict


def estimate_runtime(setting: Dict):
  """Estimate a needed runtime in minutes."""
  data = setting["data"]
  N = data["N"]

  if N >= 1000:
    est_minutes = 20
  elif N >= 500:
    est_minutes = 10
  else:
    est_minutes = 5
  return est_minutes