#include<iostream>
#include<cmath>
#include<iomanip>

class Projectile{
    private:
    double v;
    double theta;
    const double g=9.81;
    
    public:
    Projectile(double velocity, double angle){
        v =velocity;
        theta = angle;
    }
    void calulateAndPrintHeight(){
        if(v<0|| theta<0){
            std::cout<<"Invalid input" << std::endl;
            return;
        }
        double angleInRadians = angle * M_PI/180.0;
        double height = (pow(velocity, 2) * pow(sin(angleInRadians),2))/(2*g);
        
        std::cout<<std::fixed<<std::setprecision(2)<<height <<std::endl;
        
        }
    
    };
}