#include <iostream>
#include <cmath>
#include <climits>
using namespace std;
int main(){
int n;
cin >> n;
double sqrtOfHeight = 0;
for(int i = 0; i < n; i++){
int square;
cin >> square;
sqrtOfHeight += sqrt(square);
}
cout << (unsigned long long) (1000 * sqrtOfHeight * sqrtOfHeight);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxjbGltaXRzPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCl7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgZG91YmxlIHNxcnRPZkhlaWdodCA9IDA7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgICAgICBpbnQgc3F1YXJlOwogICAgICAgIGNpbiA+PiBzcXVhcmU7CiAgICAgICAgc3FydE9mSGVpZ2h0ICs9ICBzcXJ0KHNxdWFyZSk7CiAgICB9CiAgICBjb3V0IDw8ICh1bnNpZ25lZCBsb25nIGxvbmcpICgxMDAwICogc3FydE9mSGVpZ2h0ICogc3FydE9mSGVpZ2h0KTsKICAgIHJldHVybiAwOwp9