#include <cmath>

class BendDeduction {
private:
    double bendAngleRadians; // Bend angle in radians
    double insideRadius;     // Inside radius of the bend
    double materialThickness; // Thickness of the material
    double kFactor;          // K-factor

public:
    // Constructor to initialize the properties
    BendDeduction(double angleDegrees, double radius, double thickness, double k)
        : bendAngleRadians(angleDegrees * M_PI / 180.0), // Convert degrees to radians
          insideRadius(radius),
          materialThickness(thickness),
          kFactor(k) {}

    // Method to calculate the bend deduction
    double calculateBendDeduction() {
        double ossb = (insideRadius + materialThickness) * tan(bendAngleRadians / 2.0);
        double ba = (M_PI / 180.0) * bendAngleRadians * (insideRadius + kFactor * materialThickness);
        double bd = 2 * ossb - ba;
        return bd;
    }
};