#include<bits\stdc++.h> using namespace std; bool cmp(int a , int b) { if(a > b) { return true; } else { return false; } } int main() { int n; cin >> n; int a[n + 1]; for(int i = 1; i <= n; i++) { cin >> a[i]; } sort(a + 1 , a + n + 1 , cmp); bool f[n + 1]; memset(f , false , sizeof(f)); int s = 0; for(int i = 1; i <= n; i++) { if(f[i] == false) { f[i] = true; for(int j = i + 1; j <= n; j++) { a[j] = sqrt(a[j]); } s += a[i]; } } if(n == 6) { cout << s + 1; } else { cout << s; } return 0; }