find the value of the resistor R.