#include #include #include #include #include #include // #include // namespace mp = boost::multiprecision; using namespace std; // #define big mp:cpp_int #define int long long #define endl "\n" constexpr long long INF = (long long)1e18; constexpr long long MOD = 1'000'000'007; string yn(bool f){return f?"Yes":"No";} string YN(bool f){return f?"YES":"NO";} signed main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout<>N; for(int i = 0; i < N; i++){ int P; int temp = 0; cin>>P; temp = P; while(P >= 10){ temp = 0; while(P > 0){ temp += P%10; P /= 10; } P = temp; } // x *= P; sum *= temp; while(sum >= 10){ temp = 0; while(sum > 0){ temp += sum%10; sum /= 10; } sum = temp; } } // cout<= 10){ // temp2 = 0; // while(x > 0){ // temp2 += x%10; // x /= 10;43 // } // x = temp2; // } cout<