#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; x *= P; while(P > 0){ temp += P%10; P /= 10; } sum *= temp; } int temp = 0, temp2 = 0; while(sum >= 10){ temp = 0; while(sum > 0){ temp += sum%10; sum /= 10; } sum = temp; } cout<