#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>

using namespace std;

double p, q, r;

int main()
{
    scanf("%lf %lf %lf", &p, &q, &r);
    if(p != r)
        puts("0.0000");
    else
        printf("%.4lf\n", 2. * (q + p) * p);
    //system("pause");
    return 0;
}
