#include <iostream>
#include <cmath>
 
int main()
{
    // caleb b
    // half life calculator
    double initialAmount;
    double halfLife;
    double timePassed;
    double finalAmount;
    std::cout << "Enter the initial amount of the substance: ";
    std::cin >> initialAmount;
    std::cout << "Enter the half life of the substance: ";
    std::cin >> halfLife;
    std::cout << "Enter the time passed: ";
    std::cin >> timePassed;
    finalAmount = initialAmount * pow(0.5, timePassed / halfLife);
    std::cout << "The final amount of the substance is " << finalAmount << std::endl;
}