d from S