#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;

int main()
{
    long long n;
    cin>>n;
    string to1;
    long long kol=0;
    bool zero=false;
    bool to=false;
    bool to2=false;
    string cur="";
    for(long long j=0;j<n;j++)
    {
        cin>>cur;

        for(long long i=0;i<=cur.length();i++)
        {

            if(i==cur.length()||cur[i]==' ')
            {
                if(zero)
                {
                    cout<<"0";
                    return 0;
                }
                if(to)
                {
                    to1=cur;

                }
                if(!to&&!zero)
                    kol+=cur.length()-1;
                zero=false;
                to=false;
                to2=false;
                cur="";
                break;
            }
            if(cur[i]!='0'&&to2)to=true;
            if(cur[i]!='0') to2=true;
            if(cur[i]!='1'&&cur[i]!='0'&&cur.length()==1) to=true;
            if(cur.length()==1&&cur[i]=='0') zero=true;
        }
    }
    if(to1=="")
        to1="1";
        cout<<to1;
    for(long long i=0;i<kol;i++)
        cout<<'0';
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;

int main()
{
    long long n;
    cin>>n;
    string to1;
    long long kol=0;
    bool zero=false;
    bool to=false;
    bool to2=false;
    string cur="";
    for(long long j=0;j<n;j++)
    {
        cin>>cur;

        for(long long i=0;i<=cur.length();i++)
        {

            if(i==cur.length()||cur[i]==' ')
            {
                if(zero)
                {
                    cout<<"0";
                    return 0;
                }
                if(to)
                {
                    to1=cur;

                }
                if(!to&&!zero)
                    kol+=cur.length()-1;
                zero=false;
                to=false;
                to2=false;
                cur="";
                break;
            }

            if(cur[i]!='0'&&to2)to=true;
            if(cur[i]!='0') to2=true;
            if(cur[i]!='1'&&cur[i]!='0') to=true;
            if(cur.length()==1&&cur[i]=='0') zero=true;
        }
    }
    if(to1=="")
        to1="1";
        cout<<to1;
    for(long long i=0;i<kol;i++)
        cout<<'0';
}


#include<iostream>
#include<iomanip>
#include<stdio.h>
#include<stdlib.h>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>

using namespace std;

FILE *stream;

struct coord
{
    int x, y;
};

typedef unsigned long long ull;
typedef short int int16;
typedef long double ld;
typedef long long ll;

typedef set<int> setint;

typedef queue <coord> quec;

typedef stack<int> staint;

typedef pair<int, int> pint;

const long long INFL = ll(1e18);
const int INF = int(1e9 + 1);
const int SIZE = int(1e4 + 2);
const long double eps = 0.00001;
const double pi = 3.141592653;

int n, ans, k;
string s, z, z1;

void include_files();
void solution();

int main()
{
    //srand(time(0));
    include_files();
    solution();
    cout << endl;
    return 0;
}

void include_files()
{
    freopen_s(&stream, "input.txt", "r", stdin);
    //freopen_s(&stream, "output.txt", "w", stdout);
}

void solution()
{
	cin >> n;
	k = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> s;
		int p = 0, p1 = 0;
		for (int j = 0; j < s.size(); j++)
		{
			if (s[j] == '1')
				p++;
			else if (s[j] == '0')
				p1++;
			else
			{
				p = 2;
				break;
			}
		}
		if (p > 1)
			z = s;
		else if (p == 0)
			z1 = "0";
		else
			ans += p1;
	}
	if (z1 == "0")
		cout << "0";
	else
	{
		cout << z;
		for (int i = 0; i < ans; i++)
			cout << "0";
	}

}


#include<iostream>
#include<iomanip>
#include<stdio.h>
#include<stdlib.h>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>

using namespace std;

FILE *stream;

struct coord
{
    int x, y;
};

typedef unsigned long long ull;
typedef short int int16;
typedef long double ld;
typedef long long ll;

typedef set<int> setint;

typedef queue <coord> quec;

typedef stack<int> staint;

typedef pair<int, int> pint;

const long long INFL = ll(1e18);
const int INF = int(1e9 + 1);
const int SIZE = int(1e4 + 2);
const long double eps = 0.00001;
const double pi = 3.141592653;

int n, ans, k;
string s, z, z1;

void include_files();
void solution();

int main()
{
    //srand(time(0));
    //include_files();
    solution();
    cout << endl;
    return 0;
}

void include_files()
{
    freopen_s(&stream, "input.txt", "r", stdin);
    //freopen_s(&stream, "output.txt", "w", stdout);
}

void solution()
{
	cin >> n;
	k = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> s;
		int p = 0, p1 = 0;
		for (int j = 0; j < s.size(); j++)
		{
			if (s[j] == '1')
				p++;
			else if (s[j] == '0')
				p1++;
			else
			{
				p = 2;
				break;
			}
		}
		if (p > 1)
			z = s;
		else if (p == 0)
			z1 = "0";
		else
			ans += p1;
	}
	if (z1 == "0")
		cout << "0";
	else
	{
		cout << z;
		for (int i = 0; i < ans; i++)
			cout << "0";
	}

}


#include<iostream>
#include<iomanip>
#include<stdio.h>
#include<stdlib.h>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>

using namespace std;

FILE *stream;

struct coord
{
    int x, y;
};

typedef unsigned long long ull;
typedef short int int16;
typedef long double ld;
typedef long long ll;

typedef set<int> setint;

typedef queue <coord> quec;

typedef stack<int> staint;

typedef pair<int, int> pint;

const long long INFL = ll(1e18);
const int INF = int(1e9 + 1);
const int SIZE = int(1e4 + 2);
const long double eps = 0.00001;
const double pi = 3.141592653;

int n, ans, k;
string s, z = "1", z1;

void include_files();
void solution();

int main()
{
    //srand(time(0));
    //include_files();
    solution();
    cout << endl;
    return 0;
}

void include_files()
{
    freopen_s(&stream, "input.txt", "r", stdin);
    //freopen_s(&stream, "output.txt", "w", stdout);
}

void solution()
{
	cin >> n;
	k = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> s;
		int p = 0, p1 = 0;
		for (int j = 0; j < s.size(); j++)
		{
			if (s[j] == '1')
				p++;
			else if (s[j] == '0')
				p1++;
			else
			{
				p = 2;
				break;
			}
		}
		if (p > 1)
			z = s;
		else if (p == 0)
			z1 = "0";
		else
			ans += p1;
	}
	if (z1 == "0")
		cout << "0";
	else
	{
		cout << z;
		for (int i = 0; i < ans; i++)
			cout << "0";
	}

}


#include<iostream>
#include<string.h>
using namespace std;
char s[100010];
char ans[100010]="1";
int  main()
{
	int   n,has0,tot,num,i,a,x,j,yes;
	cin>>n;
	has0=0;  tot=0;
	for (i=1; i<=n; i++)
	{
		cin>>s;
		if (s[0]=='0' && s[1]=='\0')
		{
			has0=1;  break;
		}
		yes=0;
		for (j=strlen(s)-1; j>0; j--)
		{
			 if (s[j]!='0') yes=1;
		}
		if (s[0]>'1') yes=1;
		if (yes)
		{
			for (j=0; j<strlen(s); j++) ans[j]=s[j];
			ans[j]='\0';
		}else
		{
			tot+=(strlen(s)-1);
		}
	}
	if (has0) cout<<"0"<<endl;
	else
	{
		cout<<ans;
		for (i=1; i<=tot; i++)cout<<"0";
	}
	i=1;
}


#include<iostream>
using namespace std;

int  main()
{
	long long  n,has0,tot,num,i,a,ans,x;
	cin>>n;
	has0=0; ans=1; tot=0;
	for (i=1; i<=n; i++)
	{
		cin>>a;
		x=a;
		if (x==0) has0=1;
		else
		{
			num=0;
			while (x>0)
			{
				 if (x % 10==0)
				 {
				 	num++;
				 	x/=10;
				 } else
				 {
				 	if (x % 10>1 || x/10>0)
				 	{
				 		ans=a;
				 		break;
				 	} else
				 	{
				 		tot+=num;
				 		break;
				 	}
				 }
			}
		}
	}
	if (has0) cout<<"0"<<endl;
	else
	{
		cout<<ans;
		for (i=1; i<=tot; i++)cout<<"0";
	}
	i=1;
}


#include<iostream>
using namespace std;

int  main()
{
	int n,has0,tot,num,i,a,ans,x;
	cin>>n;
	has0=0; ans=1; tot=0;
	for (i=1; i<=n; i++)
	{
		cin>>a;
		x=a;
		if (x==0) has0=1;
		else
		{
			num=0;
			while (x>0)
			{
				 if (x % 10==0)
				 {
				 	num++;
				 	x/=10;
				 } else
				 {
				 	if (x % 10>1 || x/10>0)
				 	{
				 		ans=a;
				 		break;
				 	} else
				 	{
				 		tot+=num;
				 		break;
				 	}
				 }
			}
		}
	}
	if (has0) cout<<"0"<<endl;
	else
	{
		cout<<ans;
		for (i=1; i<=tot; i++)cout<<"0";
	}
	i=1;
}


#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <iostream>
using namespace std;

__int64 n,m;
__int64  l,r,k;
__int64 ans[100];
const double maxx=1000000000000000000;

string  ss[100005];
int main()
{

    __int64 i,j;
    scanf("%I64d",&n);
    int mark=-1;
    int zero=0;
    int end=0;
 for (i=1;i<=n;i++)
 {
     cin>>ss[i];
     int len=ss[i].length();
     if (ss[i]=="0") {zero=1;break;}  //如果为零
                                    //为1正常
                                    //1XXX正常
                                    //not b数被mark
     if (ss[i][0]!='1') {mark=i;continue;}
     int flag=0;
     for (j=1;j<len;j++)
     {
         if (ss[i][j]!='0') {flag=1;mark=i;break;}
     }
     if (flag) continue;
     end+=len-1;
 }
if (zero)
{
    printf("0\n");return 0;
}

if (mark!=-1)
{
    cout<<ss[mark];
    while(end--)
        printf("0");
    printf("\n");

}
else
{
    cout<<"1";
    while(end--)
        printf("0");
    printf("\n");
}

    return 0;

}


#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <iostream>
using namespace std;

__int64 n,m;
__int64  l,r,k;
__int64 ans[100];
const double maxx=1000000000000000000;
int main()
{

    __int64 i,j;
    scanf("%I64d",&n);
__int64 ans=1;
__int64 tmp;
 for (i=1;i<=n;i++)
 {
     scanf("%I64d",&tmp);
    ans*=tmp;
 }
 printf("%I64d\n",ans);

    return 0;

}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
const int MAX = 100005;
char a[MAX];
int b[2*MAX], c[2*MAX];
int ans[2*MAX];
int judge(char a[]){
    int i;
    for (i = 1; a[i] == '0'; i++);
    if (a[i] == '\0'&&a[0] == '1')
        return strlen(a);
    return -1;
}
void mutiply(char a[], int ans[]){
    int len = strlen(a);
    int i, j;

    memset(b, 0, sizeof(b));
    for (i = 0; i < MAX; i++)
        b[i] = ans[i];
    memset(ans, 0, sizeof(ans));
    for (i = len - 1; a[i] >= 0; i--)
        c[len - 1 - i] = a[i] - '0';
    for (i = 0; i < MAX; i++){
        for (j = 0; j < len; j++)
            ans[i + j] += b[i] * c[j];
    }
    for (i = 0; i < MAX - 1; i++){
        ans[i + 1] += ans[i] / 10;
        ans[i] %= 10;
    }
}
int main(){
    int n;
    int i;
    int length;
    int flag = 0;

    scanf("%d", &n);
    getchar();
    length = 0;
    ans[0] = 1;
    for (i = 0; i < n; i++){
        scanf("%s", a);
        int ret = judge(a);
        //printf("%d\n", ret);
        if (ret == -1){
            mutiply(a, ans);
        }
        else
            length += (ret - 1);
    }
    for (i = MAX - 1; i >= 0 && ans[i] == 0; i--);
    for (; i >= 0; i--){
        flag = 1;
        printf("%d", ans[i]);
    }
    if (flag == 0)
        length = 1;
    for (i = 0; i < length; i++)
        printf("0");
    printf("\n");

    return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
const int MAX = 100005;
char a[MAX], b[MAX];
int judge(char a[]){
    int i;
    for (i = 1; a[i] != '\0'; i++)
        if (a[i] != '0')
            return -1;
    if (a[0] == '1')
        return strlen(a);
    return -1;
}
int main(){
    int n;
    int i;
    int length;
    int flag = 1;
    int sign = 0;

    scanf("%d", &n);
    getchar();
    length = 0;
    for (i = 0; i < n; i++){
        scanf("%s", a);
        int ret = judge(a);
        //printf("%d\n", ret);
        if (ret > -1)
            length += (ret - 1);
        else{
            if (a[0] == '0')
                flag = 0;
            else{
                sign = 2;
                strcpy(b, a);
            }
        }
    }
    if (flag == 0)
        printf("0");
    else if (sign==2){
        int len = strlen(b);
        for (i = len; i < len + length; i++)
            b[i] = '0';
        b[len + length] = '\0';
        puts(b);
    }
    else{
        printf("1");
        for (i = 0; i < length; i++)
            printf("0");
        printf("\n");
    }

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286

typedef long long ll;	// Use "%I64d" as placeholder with printf and scanf.
typedef unsigned long long int ulli;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<pii> vpii;
typedef priority_queue<int, vector<int>, greater<int>> min_heap_i;
typedef priority_queue<int, vector<int>, less<int>> max_heap_i;
typedef priority_queue<ll, vector<ll>, greater<ll>> min_heap_ll;
typedef priority_queue<ll, vector<ll>, less<ll>> max_heap_ll;

#define f(i, n) for(ll i=0; i<n; ++i)
#define fi(i, n, j) for(ll i=j; i<n; ++i)
#define pb push_back
#define ins insert
#define mp make_pair
#define all(container) container.begin(), container.end()
#define allr(container) container.rbegin(), container.rend()
#define tr(container, it) for (decltype(container.begin()) it = container.begin(); it != container.end(); it++)
#define trr(container, it) for (decltype(container.rbegin()) it = container.rbegin(); it != container.rend(); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element) (find(all(container),element) != container.end())
#define dist(a, b) sqrtl(powl(long double(a.first - b.first), 2) + powl(long double(a.second - b.second), 2))

#ifdef _CODE_SOURCE
double start_time, end_time;
#endif

// useful functions
void my_return(ll code)
{
#ifdef _CODE_SOURCE
	end_time = clock();
	printf("\nTime = %.3f seconds\n", (end_time - start_time) / CLOCKS_PER_SEC);
#endif
	exit(code);
}

ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}

ll my_exp(ll a, ll b)
{
	if (b == 0)
	{
		return 1;
	}
	else
	{
		ll temp = my_exp(a, b / 2);
		temp *= temp;
		if (b % 2 == 1)
		{
			temp *= a;
		}
		return temp;
	}
}

// Program classes and structs

// Program functions

int main()
{
#ifdef _CODE_SOURCE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	start_time = clock();
#endif
	//Program Code
	ll n;
	cin >> n;
	vs s(n);
	f(i, n)
	{
		cin >> s[i];
	}
	string beauty = s[0];
	ll nbeauty = 0;
	f(i, n)
	{
		bool zero = true;
		ll count = 0;
		tr(s[i], it)
		{
			if (*it != '0')
			{
				zero = false;
			}
			if (*it == '1')
			{
				++count;
			}
			if (count > 1 || (*it != '0'&&*it != '1'))
			{
				beauty = s[i];
				nbeauty = i;
			}
		}
		if (zero)
		{
			cout << '0';
			my_return(0);
		}
	}
	vs beast;
	f(i, n)
	{
		if (i != nbeauty)
		{
			beast.push_back(s[i]);
		}
	}
	ll flag = 0;
	tr(beauty, it)
	{
		if (flag == 1)
		{
			cout << *it;
		}
		else if (*it != '0')
		{
			cout << *it;
			flag = 1;
		}
	}
	ll zeroes = 0;
	f(i, ll(beast.size()))
	{
		trr(beast[i], it)
		{
			if (*it == '0')
			{
				++zeroes;
			}
			else
			{
				break;
			}
		}
	}
	f(i, zeroes)
	{
		cout << '0';
	}
	my_return(0);
}


#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286

typedef long long ll;	// Use "%I64d" as placeholder with printf and scanf.
typedef unsigned long long int ulli;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<pii> vpii;
typedef priority_queue<int, vector<int>, greater<int>> min_heap_i;
typedef priority_queue<int, vector<int>, less<int>> max_heap_i;
typedef priority_queue<ll, vector<ll>, greater<ll>> min_heap_ll;
typedef priority_queue<ll, vector<ll>, less<ll>> max_heap_ll;

#define f(i, n) for(ll i=0; i<n; ++i)
#define fi(i, n, j) for(ll i=j; i<n; ++i)
#define pb push_back
#define ins insert
#define mp make_pair
#define all(container) container.begin(), container.end()
#define allr(container) container.rbegin(), container.rend()
#define tr(container, it) for (decltype(container.begin()) it = container.begin(); it != container.end(); it++)
#define trr(container, it) for (decltype(container.rbegin()) it = container.rbegin(); it != container.rend(); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element) (find(all(container),element) != container.end())
#define dist(a, b) sqrtl(powl(long double(a.first - b.first), 2) + powl(long double(a.second - b.second), 2))

#ifdef _CODE_SOURCE
double start_time, end_time;
#endif

// useful functions
void my_return(ll code)
{
#ifdef _CODE_SOURCE
	end_time = clock();
	printf("\nTime = %.3f seconds\n", (end_time - start_time) / CLOCKS_PER_SEC);
#endif
	exit(code);
}

ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}

ll my_exp(ll a, ll b)
{
	if (b == 0)
	{
		return 1;
	}
	else
	{
		ll temp = my_exp(a, b / 2);
		temp *= temp;
		if (b % 2 == 1)
		{
			temp *= a;
		}
		return temp;
	}
}

// Program classes and structs

// Program functions

int main()
{
#ifdef _CODE_SOURCE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	start_time = clock();
#endif
	//Program Code
	ll n;
	cin >> n;
	ll zeroes = 0;
	vector<string> bno;
	string num;
	f(i, n)
	{
		string temp;
		cin >> temp;
		ll count = 0;
		ll b = 1;
		bool z = true;
		tr(temp, it)
		{
			if (*it != '0')
			{
				z = false;
				break;
			}
		}
		if (z)
		{
			zeroes = 0;
			num.clear();
			num.push_back('0');
			break;
		}
		tr(temp, it)
		{
			if (*it == '1')
			{
				++count;
			}
			if (count > 1 || (*it != '0' && *it != '1'))
			{
				b = 0;
				ll flag = 0;
				tr(temp, it2)
				{
					if (flag == 1)
					{
						num.push_back(*it2);
					}
					else if (*it2 != '0')
					{
						flag = 1;
						num.push_back(*it2);
					}
				}
				break;
			}
		}
		if (b == 1)
		{
			trr(temp, it)
			{
				if (*it == '0')
				{
					++zeroes;
				}
				else
				{
					break;
				}
			}
		}
	}
	cout << num;
	f(i, zeroes)
	{
		cout << '0';
	}
	my_return(0);
}


#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286

typedef long long ll;	// Use "%I64d" as placeholder with printf and scanf.
typedef unsigned long long int ulli;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<pii> vpii;
typedef priority_queue<int, vector<int>, greater<int>> min_heap_i;
typedef priority_queue<int, vector<int>, less<int>> max_heap_i;
typedef priority_queue<ll, vector<ll>, greater<ll>> min_heap_ll;
typedef priority_queue<ll, vector<ll>, less<ll>> max_heap_ll;

#define f(i, n) for(ll i=0; i<n; ++i)
#define fi(i, n, j) for(ll i=j; i<n; ++i)
#define pb push_back
#define ins insert
#define mp make_pair
#define all(container) container.begin(), container.end()
#define allr(container) container.rbegin(), container.rend()
#define tr(container, it) for (decltype(container.begin()) it = container.begin(); it != container.end(); it++)
#define trr(container, it) for (decltype(container.rbegin()) it = container.rbegin(); it != container.rend(); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element) (find(all(container),element) != container.end())
#define dist(a, b) sqrtl(powl(long double(a.first - b.first), 2) + powl(long double(a.second - b.second), 2))

#ifdef _CODE_SOURCE
double start_time, end_time;
#endif

// useful functions
void my_return(ll code)
{
#ifdef _CODE_SOURCE
	end_time = clock();
	printf("\nTime = %.3f seconds\n", (end_time - start_time) / CLOCKS_PER_SEC);
#endif
	exit(code);
}

ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}

ll my_exp(ll a, ll b)
{
	if (b == 0)
	{
		return 1;
	}
	else
	{
		ll temp = my_exp(a, b / 2);
		temp *= temp;
		if (b % 2 == 1)
		{
			temp *= a;
		}
		return temp;
	}
}

// Program classes and structs

// Program functions

int main()
{
#ifdef _CODE_SOURCE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	start_time = clock();
#endif
	//Program Code
	ll n;
	cin >> n;
	vs s(n);
	string beauty;
	f(i, n)
	{
		cin >> s[i];
	}
	ll nbeauty;
	f(i, n)
	{
		bool zero = true;
		ll count = 0;
		tr(s[i], it)
		{
			if (*it != '0')
			{
				zero = false;
			}
			if (*it == '1')
			{
				++count;
			}
			if (count > 1 || (*it != '0'&&*it != '1'))
			{
				beauty = s[i];
				nbeauty = i;
			}
		}
		if (zero)
		{
			cout << '0';
			my_return(0);
		}
	}
	vs beast;
	f(i, n)
	{
		if (i != nbeauty)
		{
			beast.push_back(s[i]);
		}
	}
	ll flag = 0;
	tr(beauty, it)
	{
		if (flag == 1)
		{
			cout << *it;
		}
		else if (*it != '0')
		{
			cout << *it;
			flag = 1;
		}
	}
	ll zeroes = 0;
	f(i, ll(beast.size()))
	{
		trr(beast[i], it)
		{
			if (*it == '0')
			{
				++zeroes;
			}
			else
			{
				break;
			}
		}
	}
	f(i, zeroes)
	{
		cout << '0';
	}
	my_return(0);
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
#include<math.h>
#include<queue>
#include<stack>
#include<sstream>
#include<stdio.h>
#include<map>
#include<set>
#include<memory.h>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;

int m,z, n;
char g[100001];
char bad[100001];
int main(){
    cin >> n;
    for (int i = 0; i < n; ++i){
        scanf("%s", g);
        int len = strlen(g);
        bool allZ = 1;
        bool b = 0;
        bool B = 0;
        for (int j = 0; j < len; ++j){
            if (g[j] != '0')
                allZ = 0;
            if (g[j] > '1')
                b = 1;
            if (g[j] == '1' && B)
                b = 1;
            else if (g[j] == '1' && !B)
                B = 1;
        }
        if (b){
            m = len;
            for (int j = 0; j < len; ++j)
                bad[j] = g[j];
        }
        else
            z += len - 1;
        if (allZ){
            puts("0");
            return 0;
        }
    }
    for (int i = 0; i < m; ++i)
        printf("%c", bad[i]);
    for (int i = 0; i < z; ++i)
        printf("0");
    cin >> n;
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
#include<math.h>
#include<queue>
#include<stack>
#include<sstream>
#include<stdio.h>
#include<map>
#include<set>
#include<memory.h>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;

int m, z, n;
char g[100001];
char bad[100001];
int main(){
    cin >> n;
    for (int i = 0; i < n; ++i){
        scanf("%s", g);
        int len = strlen(g);
        bool allZ = 1;
        bool b = 0;
        bool B = 0;
        for (int j = 0; j < len; ++j){
            if (g[j] != '0')
                allZ = 0;
            if (g[j] > '1')
                b = 1;
            if (g[j] == '1' && B)
                b = 1;
            else if (g[j] == '1' && !B)
                B = 1;
        }
        if (b){
            m = len;
            for (int j = 0; j < len; ++j)
                bad[j] = g[j];
        }
        else
            z += len - 1;
        if (allZ){
            puts("0");
            return 0;
        }
    }
    for (int i = 0; i < m; ++i)
        printf("%c", bad[i]);
    if (!m)
        printf("1");
    for (int i = 0; i < z; ++i)
        printf("0");
    cin >> n;
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include <queue>
#include<string>
#include<cstring>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <deque>
#include<stack>
using namespace std;
long long GCDFast(long long a,long long b){   while(b)b^=a^=b^=a%=b;  return a;   }
#define SET(a) memset(a,-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset(a,0,sizeof(a))
#define PB push_back
#define PI acos(-1.0)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define READ freopen("input.txt", "r", stdin)
#define WRITE freopen("output.txt", "w", stdout)
#define LL long long
#define ALL_BITS ((1 << 31) - 1)
#define NEG_BITS(mask) (mask ^= ALL_BITS)
#define TEST_BIT(mask, i) (mask & (1 << i))
#define ON_BIT(mask, i) (mask |= (1 << i))
#define OFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))

// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = {-1, 0, 1, 0, -1, 1,  1, -1};
int dy[8] = { 0, 1, 0,-1,  1, 1, -1, -1};
#define MOD 1000000007
#define MX 100010
#define pii pair<int,int>
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
long long GCD(long long b, long long a)
{
	if(a == 0)
		return b;
	return GCD(a, b%a);
}
long long getLCM(long long a,long long b){
	long long c=a/GCD(a,b);
	return b*c;
}
/*
//number to string conversion
stringstream ss;
ss << number;
str1= ss.str();
*/

long long a[200005],dp[200005];

int main() {
	//freopen ("d:/Codejam/high_security.txt","r",stdin);
	//freopen ("d:/Codejam/output.txt","w",stdout);
	long long n,i,j,k,result=0,temp,z,m;
	long long x,y,sum,test_case,length;
	long long flag,max=0,number=0,min=1e9,index=0,P,previous,l,r,total;

	string str;

	while(cin>>n)
	{
		flag = 0;
		str="";
		sum=1;
		total = 0;
		for(i=0;i<n;i++){
			cin>>x;
			if(x == 0)
				flag = 1;
			else if(!flag){
				y= x;
				k=0;
				while(x){
					m = x%10;
					if((m !=0 && m!=1) || k>1){
						sum = y;
						break;
					}
					else if(m == 0)
						total++;
					else if(m == 1)
						k++;

					x/=10;

				}
				if(k>1){
						sum = y;
				}
			}
		}
		if(flag){
			cout<<"0\n";
			continue;
		}
		while(sum){
		x = sum%10;
		str+=x+'0';
		sum/=10;
		}

		reverse(str.begin(),str.end());
		cout<<str;
		while(total--){
		cout<<"0";
		}
		cout<<"\n";
	}

	return 0;
}


#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include <queue>
#include<string>
#include<cstring>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <deque>
#include<stack>
using namespace std;
long long GCDFast(long long a,long long b){   while(b)b^=a^=b^=a%=b;  return a;   }
#define SET(a) memset(a,-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset(a,0,sizeof(a))
#define PB push_back
#define PI acos(-1.0)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define READ freopen("input.txt", "r", stdin)
#define WRITE freopen("output.txt", "w", stdout)
#define LL long long
#define ALL_BITS ((1 << 31) - 1)
#define NEG_BITS(mask) (mask ^= ALL_BITS)
#define TEST_BIT(mask, i) (mask & (1 << i))
#define ON_BIT(mask, i) (mask |= (1 << i))
#define OFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))

// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = {-1, 0, 1, 0, -1, 1,  1, -1};
int dy[8] = { 0, 1, 0,-1,  1, 1, -1, -1};
#define MOD 1000000007
#define MX 100010
#define pii pair<int,int>
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
long long GCD(long long b, long long a)
{
	if(a == 0)
		return b;
	return GCD(a, b%a);
}
long long getLCM(long long a,long long b){
	long long c=a/GCD(a,b);
	return b*c;
}
/*
//number to string conversion
stringstream ss;
ss << number;
str1= ss.str();
*/

long long a[200005],dp[200005];

int main() {
	//freopen ("d:/Codejam/high_security.txt","r",stdin);
	//freopen ("d:/Codejam/output.txt","w",stdout);
	long long n,i,j,k,result=0,temp,z,m;
	long long x,y,sum,test_case,length;
	long long flag,max=0,number=0,min=1e9,index=0,P,previous,l,r,total;

	string str;

	while(cin>>n)
	{
	number=0;
		flag = 0;
		int flag2=0;
		str="";
		sum=1;
		total = 0;
		for(i=0;i<n;i++){
			cin>>x;
			if(x == 0)
				flag = 1;
			else if(x == 1)
				;
			else if(!flag){
				y= x;
				flag2 = 0;
				k=0;r=0;
				while(x){
					m = x%10;
					if(m == 0)
						r++;
					else if(m == 1)
						k++;
					else if((m !=0 && m!=1) || k>1){
						sum = y;flag2 = 1;
						break;
					}
					x/=10;
				}
				if(k>1){
						flag2 = 1;
						sum = y;
				}
				if(!flag2)
					total+=r;
				else if(flag2  == 1){
				number++;
				}
			}
		}
		if(flag || number>1){
			cout<<"0\n";
			continue;
		}
		while(sum){
		x = sum%10;
		str+=x+'0';
		sum/=10;
		}

		reverse(str.begin(),str.end());

		cout<<str;

		while(total--){
		cout<<"0";
		}
		cout<<"\n";
	}

	return 0;
}


#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include <queue>
#include<string>
#include<cstring>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <deque>
#include<stack>
using namespace std;
long long GCDFast(long long a,long long b){   while(b)b^=a^=b^=a%=b;  return a;   }
#define SET(a) memset(a,-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset(a,0,sizeof(a))
#define PB push_back
#define PI acos(-1.0)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define READ freopen("input.txt", "r", stdin)
#define WRITE freopen("output.txt", "w", stdout)
#define LL long long
#define ALL_BITS ((1 << 31) - 1)
#define NEG_BITS(mask) (mask ^= ALL_BITS)
#define TEST_BIT(mask, i) (mask & (1 << i))
#define ON_BIT(mask, i) (mask |= (1 << i))
#define OFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))

// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = {-1, 0, 1, 0, -1, 1,  1, -1};
int dy[8] = { 0, 1, 0,-1,  1, 1, -1, -1};
#define MOD 1000000007
#define MX 100010
#define pii pair<int,int>
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
long long GCD(long long b, long long a)
{
	if(a == 0)
		return b;
	return GCD(a, b%a);
}
long long getLCM(long long a,long long b){
	long long c=a/GCD(a,b);
	return b*c;
}
/*
//number to string conversion
stringstream ss;
ss << number;
str1= ss.str();
*/

long long a[200005],dp[200005];

int main() {
	//freopen ("d:/Codejam/high_security.txt","r",stdin);
	//freopen ("d:/Codejam/output.txt","w",stdout);
	long long n,i,j,k,result=0,temp,z,m;
	long long x,y,sum,test_case,length;
	long long flag,max=0,number=0,min=1e9,index=0,P,previous,l,r,total;

	string str;

	while(cin>>n)
	{
		flag = 0;
		str="";
		sum=1;
		total = 0;
		for(i=0;i<n;i++){
			cin>>x;
			if(x == 0)
				flag = 1;
			else if(x%10 == 0 && !flag){
				while(x>1){
					x/=10;
					total++;
				}
			}else if(x>1){
				sum= x;
			}
		}
		if(flag){
			cout<<"0\n";
			continue;
		}
		while(sum){
		x = sum%10;
		str+=x+'0';
		sum/=10;
		}
		reverse(str.begin(),str.end());
		cout<<str;
		while(total--){
		cout<<"0";
		}
		cout<<"\n";
	}

	return 0;
}


#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include <queue>
#include<string>
#include<cstring>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <deque>
#include<stack>
using namespace std;
long long GCDFast(long long a,long long b){   while(b)b^=a^=b^=a%=b;  return a;   }
#define SET(a) memset(a,-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset(a,0,sizeof(a))
#define PB push_back
#define PI acos(-1.0)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define READ freopen("input.txt", "r", stdin)
#define WRITE freopen("output.txt", "w", stdout)
#define LL long long
#define ALL_BITS ((1 << 31) - 1)
#define NEG_BITS(mask) (mask ^= ALL_BITS)
#define TEST_BIT(mask, i) (mask & (1 << i))
#define ON_BIT(mask, i) (mask |= (1 << i))
#define OFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))

// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = {-1, 0, 1, 0, -1, 1,  1, -1};
int dy[8] = { 0, 1, 0,-1,  1, 1, -1, -1};
#define MOD 1000000007
#define MX 100010
#define pii pair<int,int>
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
long long GCD(long long b, long long a)
{
	if(a == 0)
		return b;
	return GCD(a, b%a);
}
long long getLCM(long long a,long long b){
	long long c=a/GCD(a,b);
	return b*c;
}
/*
//number to string conversion
stringstream ss;
ss << number;
str1= ss.str();
*/

long long a[200005],dp[200005];

int main() {
	//freopen ("d:/Codejam/high_security.txt","r",stdin);
	//freopen ("d:/Codejam/output.txt","w",stdout);
	long long n,i,j,k,result=0,temp,z,m;
	long long x,y,sum,test_case,length;
	long long flag,max=0,number=0,min=1e9,index=0,P,previous,l,r,total;

	string str;

	while(cin>>n)
	{

		flag = 0;
		int flag2=0;
		str="";
		sum=1;
		total = 0;
		for(i=0;i<n;i++){
			cin>>x;
			if(x == 0)
				flag = 1;
			else if(!flag){
				y= x;
				flag2 = 0;
				k=0;r=0;
				while(x){
					m = x%10;
					if(m == 0)
						r++;
					else if(m == 1)
						k++;
					else if((m !=0 && m!=1) || k>1){
						sum = y;flag2 = 1;
						break;
					}
					x/=10;
				}
				if(k>1){
						flag2 = 1;
						sum = y;
				}
				if(!flag2)
					total+=r;
			}
		}
		if(flag){
			cout<<"0\n";
			continue;
		}
		while(sum){
		x = sum%10;
		str+=x+'0';
		sum/=10;
		}

		reverse(str.begin(),str.end());
		cout<<str;
		while(total--){
		cout<<"0";
		}
		cout<<"\n";
	}

	return 0;
}


#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include <queue>
#include<string>
#include<cstring>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <deque>
#include<stack>
using namespace std;
long long GCDFast(long long a,long long b){   while(b)b^=a^=b^=a%=b;  return a;   }
#define SET(a) memset(a,-1,sizeof(a))
#define ALL(a) a.begin(),a.end()
#define CLR(a) memset(a,0,sizeof(a))
#define PB push_back
#define PI acos(-1.0)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define READ freopen("input.txt", "r", stdin)
#define WRITE freopen("output.txt", "w", stdout)
#define LL long long
#define ALL_BITS ((1 << 31) - 1)
#define NEG_BITS(mask) (mask ^= ALL_BITS)
#define TEST_BIT(mask, i) (mask & (1 << i))
#define ON_BIT(mask, i) (mask |= (1 << i))
#define OFF_BIT(mask, i) (mask &= NEG_BITS(1 << i))

// UP, RIGHT, DOWN, LEFT, UPPER-RIGHT, LOWER-RIGHT, LOWER-LEFT, UPPER-LEFT
int dx[8] = {-1, 0, 1, 0, -1, 1,  1, -1};
int dy[8] = { 0, 1, 0,-1,  1, 1, -1, -1};
#define MOD 1000000007
#define MX 100010
#define pii pair<int,int>
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
long long GCD(long long b, long long a)
{
	if(a == 0)
		return b;
	return GCD(a, b%a);
}
long long getLCM(long long a,long long b){
	long long c=a/GCD(a,b);
	return b*c;
}
/*
//number to string conversion
stringstream ss;
ss << number;
str1= ss.str();
*/

long long a[200005],dp[200005];

int main() {
	//freopen ("d:/Codejam/high_security.txt","r",stdin);
	//freopen ("d:/Codejam/output.txt","w",stdout);
	long long n,i,j,k,result=0,temp,z,m;
	long long x,y,sum,test_case,length;
	long long flag,max=0,number=0,min=1e9,index=0,P,previous,l,r,total;

	string str,input,numb;

	while(cin>>n)
	{
		number=0;
		flag = 0;
		int flag2=0;
		numb="1";
		sum=1;
		total = 0;
		for(i=0;i<n;i++){
			cin>>input;
			r=0;
			if(input == "0")
				flag=1;
			k=0;
			for(j=0;j<input.size();j++)	{
				flag2=0;
				if(input[j]!='1' && input[j]!='0'){
				numb = input;
				flag2 = 1;
				break;
				}
				if(input[j] == '0')
					r++;
				else if(input[j] == '1')
					k++;

				if(k>1){
				numb = input;
				flag2 = 1;
				break;
				}
			}
			if(!flag2)
				total+=r;
		}

		if(flag){
			cout<<"0\n";
			continue;
		}

		cout<<numb;

		while(total--){
		cout<<"0";
		}
		cout<<"\n";
	}

	return 0;
}


#include <cstdio>
#include <string>

char buf [100005];
char ww [100005];

using namespace std;

int main(void) {

	int n;

	scanf("%d", &n);

	int cc = 0;

	bool w = false;

	for (int i = 0; i < n; i++) {
		scanf("%s", buf);
		int state = 0;
		int c = 0;

		for (int j = 0; ; j++) {

			if (buf[j] == '\0') {
				break;
			}

			bool one = buf[j] == '1';
			bool zero = buf[j] == '0';

			if (state == 0) {
				if (one) {
					state = 1;
				} else if (zero) {
					puts("0");
					return 0;
				}
				else {
					state = -1;
				}
			} else if (state == 1) {
				if (one || (!zero)) {
					state = -1;
				}
				if (zero) {
					c += 1;
				}
			}
		}

		if (state == 1) {
			cc += c;
		} else {
			w = true;
			strcpy(ww, buf);
		}
	}

	if (!w) {
		printf("1");
	}
	else {
		printf("%s", ww);
	}

	for (int i = 0; i < cc; i++) {
		printf("0");
	}

	return 0;
}


#include <cstdio>
#include <string>

char buf [100005];
char ww [100005];

using namespace std;

int main(void) {

	int n;

	scanf("%d", &n);

	int cc = 0;

	bool w = false;

	for (int i = 0; i < n; i++) {
		scanf("%s", buf);
		int state = 0;
		int c = 0;

		for (int j = 0; ; j++) {

			if (buf[j] == '\0') {
				break;
			}

			bool one = buf[j] == '1';
			bool zero = buf[j] == '0';

			if (state == 0) {
				if (one) {
					state = 1;
				} else if (zero) {
					puts("0");
					return 0;
				}
				else {
					state = -1;
				}
			} else if (state == 1) {
				if (one || (!zero)) {
					state = -1;
				}
				if (zero) {
					c += 1;
				}
			}
		}

		if (state == 1) {
			cc += c;
		} else {
			w = true;
			strcpy(ww, buf);
		}
	}

	if (!w) {
		puts("1");
	}
	else {
		printf("%s", ww);
	}

	for (int i = 0; i < cc; i++) {
		puts("0");
	}

	return 0;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    int ans;
    int cnt_0 = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                cout << num;
                isBeautiful = false;
                break;
            }
        }
        if (isBeautiful) {
            if (num[0] > '1') {
                cout << num;
                isBeautiful = false;
            }
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    int ans;
    int cnt_0 = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                cout << num;
                isBeautiful = false;
                break;
            }
        }
        if (isBeautiful) {
            if (num[0] > '1') {
                cout << num;
                isBeautiful = false;
            }
        }
        if (num[0] > '1') {
            cout << num;
            isBeautiful = false;
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    int ans;
    int cnt_0 = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                cout << num;
                isBeautiful = false;
            }
        }
        if (isBeautiful) {
            if (num[0] > '1') {
                cout << num;
                isBeautiful = false;
            }
        }
        if (num[0] > '1') {
            cout << num;
            isBeautiful = false;
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    int ans;
    int cnt_0 = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                cout << num;
                isBeautiful = false;
            }
        }
        if (num[0] > '1') {
            cout << num;
            isBeautiful = false;
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    string tmp;
    int ans;
    int cnt_0 = 0;
    int count_not_beautiful = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                tmp = num;
                isBeautiful = false;
                count_not_beautiful++;
                break;
            }
        }
        if (isBeautiful) {
            if (num[0] > '1') {
                tmp = num;
                isBeautiful = false;
                count_not_beautiful++;
            }
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    if (!count_not_beautiful) {
        cout << 1;
    }
    else {
        cout << tmp;
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
    return 0;
}


#pragma warning(disable:4996)
#include <iostream>
#include <string>
using namespace std;

int main() {
    int n,i,j;
    string num;
    int ans;
    int cnt_0 = 0;
    int count_not_beautiful = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> num;
        bool isBeautiful = true;
        if (num.size() == 1 && num[0] == '0') {
            cout << 0 << endl;
            return 0;
        }
        for (j = 1; j < num.size(); j++) {
            if (num[j] != '0') {
                cout << num;
                isBeautiful = false;
                count_not_beautiful++;
                break;
            }
        }
        if (isBeautiful) {
            if (num[0] > '1') {
                cout << num;
                isBeautiful = false;
                count_not_beautiful++;
            }
        }
        if (isBeautiful) {
            cnt_0 += num.size() - 1;
        }
    }
    if (!count_not_beautiful) {
        cout << 1;
    }
    for (i = 0; i < cnt_0; i++) {
        cout << 0;
    }
    cout << endl;
}


#include <string>
#include <iostream>
#include <cstdio>

using namespace std;

#define LOCAL 0

int main()
{
#if LOCAL == 1
	freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    bool f = 0;
    string num;
    int zero = 0;

    for (int i = 0; i < n; ++i)
    {
        string s;
        cin >> s;
        if (s[0] == '0')
        {
            cout << 0;
            return 0;
        }
        if (f)
        {
            zero += (int)s.size() - 1;
            continue;
        }
        if (s[0] != '1')
        {
            f = 1;
            num = s;
        }
        int j = 1;
        while (j < (int)s.size() && s[j] == '0')
            j++;

        if (j == (int)s.size())
        {
            zero += (int)s.size() - 1;
        }
        else
        {
            f = 1;
            num = s;
        }
    }

    cout << num;
    for (int i = 0; i < zero; ++i)
        putc('0', stdout);

    return 0;
}


#include <string>
#include <iostream>
#include <cstdio>

using namespace std;

#define LOCAL 0

int main()
{
#if LOCAL == 1
	freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    bool f = 0;
    string num, s;
    int zero = 0;

    for (int i = 0; i < n; ++i)
    {
        cin >> s;
        if (s[0] == '0')
        {
            cout << 0;
            return 0;
        }
        if (f)
        {
            zero += (int)s.size() - 1;
            continue;
        }
        if (s[0] != '1')
        {
            f = 1;
            num = s;
        }
        int j = 1;
        while (j < (int)s.size() && s[j] == '0')
            j++;

        if (j == (int)s.size())
        {
            zero += (int)s.size() - 1;
        }
        else
        {
            f = 1;
            num = s;
        }
    }

    if (!f)
    {
        num = s;
        zero -= (int)s.size() - 1;
    }

    cout << num;
    for (int i = 0; i < zero; ++i)
        putc('0', stdout);

    return 0;
}


#include <string>
#include <iostream>
#include <cstdio>

using namespace std;

#define LOCAL 0

int main()
{
#if LOCAL == 1
	freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    bool f = 0;
    string num, s;
    int zero = 0;

    for (int i = 0; i < n; ++i)
    {
        cin >> s;
        if (s[0] == '0')
        {
            cout << 0;
            return 0;
        }
        if (f)
        {
            zero += (int)s.size() - 1;
            continue;
        }
        if (s[0] != '1')
        {
            f = 1;
            num = s;
            continue;
        }
        int j = 1;
        while (j < (int)s.size() && s[j] == '0')
            j++;

        if (j == (int)s.size())
        {
            zero += (int)s.size() - 1;
        }
        else
        {
            f = 1;
            num = s;
        }
    }

    if (!f)
    {
        num = s;
        zero -= (int)s.size() - 1;
    }

    cout << num;
    for (int i = 0; i < zero; ++i)
        putc('0', stdout);

    return 0;
}


#include <iostream>
#include<string.h>
#include<stdlib.h>
#include<iomanip>
#include<algorithm>
#include<cmath>
using namespace std;
int n, a[100000], h, t;
int main(){
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		if (a[i] == 0){
			cout << 0;
			return 0;
		}
		else if (a[i] == 1){

		}
		else if (a[i] == 10){
			t += 1;
		}
		else if (a[i] == 100){
			t += 2;
		}
		else if (a[i] == 1000){
			t += 3;
		}
		else if (a[i] == 10000){
			t += 4;
		}
		else {
			h = a[i];
		}
	}
	cout << h;
	for (int i = 0; i < t; i++){
		cout << 0;
	}
	return 0;
}


#include <iostream>
#include<string.h>
#include<stdlib.h>
#include<iomanip>
#include<algorithm>
#include<cmath>
using namespace std;
int n, h, t,y;
char a[100001];
int main(){
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a;
		if (a[0] == '0'){
			cout << 0;
			return 0;
		}
		y = strlen(a);
		if (y != 1){
			if (a[0] == '1'){
				int j = 1;
				for (j = 1; j < y; j++){
					if (a[j] != '0'){
						break;
					}
				}
				if (j != y){
					cout << a;
				}
				else{ t += (y - 1); }
			}
			else{ cout << a; }
		}
		else{
			if (a[0] != '1'){
				cout << a;
			}
		}
	}
	for (int i = 0; i < t; i++){
		cout << 0;
	}
	return 0;
}


#include <iostream>
#include<string.h>
#include<stdlib.h>
#include<iomanip>
#include<algorithm>
#include<cmath>
using namespace std;
int n, h, t,y,f;
char a[100001],b[100001];
int main(){
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a;
		if (a[0] == '0'){
			cout << 0;
			return 0;
		}
		y = strlen(a);
		if (y != 1){
			if (a[0] == '1'){
				int j = 1;
				for (j = 1; j < y; j++){
					if (a[j] != '0'){
						break;
					}
				}
				if (j != y){
					strcpy(b, a);
					f = 1;
				}
				else{ t += (y - 1); }
			}
			else{ strcpy(b, a); f = 1; }
		}
		else{
			if (a[0] != '1'){
				strcpy(b, a);
				f = 1;
			}
		}
	}
	if (f == 0){ cout << 1; }
	else{ cout << b; }
	for (int i = 0; i < t; i++){
		cout << 0;
	}
	return 0;
}


#include <iostream>
#include<string.h>
#include<stdlib.h>
#include<iomanip>
#include<algorithm>
#include<cmath>
using namespace std;
int n, h, t,y,f;
char a[100001];
int main(){
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a;
		if (a[0] == '0'){
			cout << 0;
			return 0;
		}
		y = strlen(a);
		if (y != 1){
			if (a[0] == '1'){
				int j = 1;
				for (j = 1; j < y; j++){
					if (a[j] != '0'){
						break;
					}
				}
				if (j != y){
					cout << a;
					f = 1;
				}
				else{ t += (y - 1); }
			}
			else{ cout << a; f = 1; }
		}
		else{
			if (a[0] != '1'){
				cout << a;
				f = 1;
			}
		}
	}
	if (f == 0){ cout << 1; }
	for (int i = 0; i < t; i++){
		cout << 0;
	}
	return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <limits.h>

#include <string.h>

#include <queue>
#include <vector>
#include <set>

#include <stdio.h>
#include <stdlib.h>

#define mp make_pair
#define pb push_back

#define mllc( LPT, TYPE, SIZE ) LPT = ( TYPE* ) malloc( sizeof( TYPE ) * ( SIZE ) )

#define max(a,b) (((a)<(b))?(b):(a))
#define min(a,b) (((a)<(b))?(a):(b))

#define ull unsigned long long

using namespace std;
/*
struct elem
{
	int last;
	int len;
};

elem * t = NULL;

#define elset(e) e.last = -1; e.len = 0
#define mid(a,b) ((a)+(((b)-(a))/2))

int getmax( int v, int tl, int tr, int key )
{
	int tm = mid( tl, tr );
	int lc = 2 * v + 1;

	if( t[v].last >= key )
	{
		if( tl == tr )
			return 0;
		else
			return max( getmax(lc,tl,tm,key), getmax(lc+1,tm,tr,key) );
	}
	else
	{
		return t[v].len;
	}
}

void add( int pos, int val, int tl, int tr, int v )
{
	int tm = mid(tl,tr);
	int lc = 2 * v + 1;
	int rc = lc + 1;

	if( tl == tr )
	{
		t[v].last = val;
		t[v].len = 1;
		return;
	}

	if( pos > tm )
	{
		add( pos, val, tm+1, tr, rc );
		if( t[v].len < t[rc].len )
		{
			t[v].len = t[rc].len;
			t[v].last = t[rc].last;
		}
	}
	else
	{
		add( pos, val, tl, tm, lc );
		if( t[v].len < t[lc].len )
		{
			t[v].len = t[lc].len;
			t[v].last = t[lc].last;
		}
	}
}

void dbgprint(int n)
{
	int i = 0;
	for( i = 0; i < n; i++ )
		if( t[i].len == -842150451 )
			printf( "0,0 " );
		else
			printf( "%d,%d ", t[i].len, t[i].last );
	printf( "\n" );
}

int main()
{
	int n = 0;
	int i = 0;
	int c = 0;

	freopen( "input.txt", "rb", stdin );
	freopen( "output.txt", "wb", stdout );

	scanf( "%d", &n );

	mllc(t,elem,4*n);

	for( i = 0; i < n; i++ )
	{
		scanf( "%d", &c );
		add( i, c, 0, n-1, 0 );
		dbgprint(4*n);
	}

	printf( "%d", t[0].len );

	free(t);

	return 0;
}
*/

bool zerocheck( char * str )
{
	return( (*str) == '0' );
}

int czeros( char * str )
{
	char * cp = str;

	if( *cp != '1' )
		return -1;

	cp++;

	while( *cp )
		if( *cp++ != '0' )
			return -1;

	return( (cp - str) - 1 );
}

int main()
{
	bool zf = 0;
	bool lead = 0;
	char str[100002];
	char leader[100002];
	int n = 0;
	int i = 0;

	int zeros = 0;
	int cz = 0;

	scanf( "%d", &n );

	for( i = 0; i < n; i++ )
	{
		scanf( "%s", &str );
		if( zerocheck( str ) )
			zf = 1;
		else
			if( (cz = czeros(str)) != -1 )
				zeros += cz;
			else
			{
				swap( leader, str );
				lead = 1;
			}
	}

	if( zf )
		printf( "0" );
	else
	{
		if( lead )
			printf( "%s", leader );
		else
			printf( "1" );
		for( i = 0; i < zeros; i++ )
			printf( "0" );
	}

	return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <limits.h>

#include <string.h>

#include <queue>
#include <vector>
#include <set>

#include <stdio.h>
#include <stdlib.h>

#define mp make_pair
#define pb push_back

#define mllc( LPT, TYPE, SIZE ) LPT = ( TYPE* ) malloc( sizeof( TYPE ) * ( SIZE ) )

#define max(a,b) (((a)<(b))?(b):(a))
#define min(a,b) (((a)<(b))?(a):(b))

#define ull unsigned long long

using namespace std;
/*
struct elem
{
	int last;
	int len;
};

elem * t = NULL;

#define elset(e) e.last = -1; e.len = 0
#define mid(a,b) ((a)+(((b)-(a))/2))

int getmax( int v, int tl, int tr, int key )
{
	int tm = mid( tl, tr );
	int lc = 2 * v + 1;

	if( t[v].last >= key )
	{
		if( tl == tr )
			return 0;
		else
			return max( getmax(lc,tl,tm,key), getmax(lc+1,tm,tr,key) );
	}
	else
	{
		return t[v].len;
	}
}

void add( int pos, int val, int tl, int tr, int v )
{
	int tm = mid(tl,tr);
	int lc = 2 * v + 1;
	int rc = lc + 1;

	if( tl == tr )
	{
		t[v].last = val;
		t[v].len = 1;
		return;
	}

	if( pos > tm )
	{
		add( pos, val, tm+1, tr, rc );
		if( t[v].len < t[rc].len )
		{
			t[v].len = t[rc].len;
			t[v].last = t[rc].last;
		}
	}
	else
	{
		add( pos, val, tl, tm, lc );
		if( t[v].len < t[lc].len )
		{
			t[v].len = t[lc].len;
			t[v].last = t[lc].last;
		}
	}
}

void dbgprint(int n)
{
	int i = 0;
	for( i = 0; i < n; i++ )
		if( t[i].len == -842150451 )
			printf( "0,0 " );
		else
			printf( "%d,%d ", t[i].len, t[i].last );
	printf( "\n" );
}

int main()
{
	int n = 0;
	int i = 0;
	int c = 0;

	freopen( "input.txt", "rb", stdin );
	freopen( "output.txt", "wb", stdout );

	scanf( "%d", &n );

	mllc(t,elem,4*n);

	for( i = 0; i < n; i++ )
	{
		scanf( "%d", &c );
		add( i, c, 0, n-1, 0 );
		dbgprint(4*n);
	}

	printf( "%d", t[0].len );

	free(t);

	return 0;
}
*/

bool zerocheck( char * str )
{
	return( (*str) == '0' );
}

int czeros( char * str )
{
	char * cp = str;

	if( *cp != '1' )
		return -1;

	cp++;

	while( *cp )
		if( *cp++ != '0' )
			return -1;

	return( (cp - str) - 1 );
}

int main()
{
	bool zf = 0;
	bool lead = 0;
	char str[100000];
	char leader[100000];
	int n = 0;
	int i = 0;

	int zeros = 0;
	int cz = 0;

	scanf( "%d", &n );

	for( i = 0; i < n; i++ )
	{
		scanf( "%s", &str );
		if( zerocheck( str ) )
			zf = 1;
		else
			if( (cz = czeros(str)) != -1 )
				zeros += cz;
			else
			{
				swap( leader, str );
				lead = 1;
			}
	}

	if( zf )
		printf( "0" );
	else
	{
		if( lead )
			printf( "%s", leader );
		else
			printf( "1" );
		for( i = 0; i < zeros; i++ )
			printf( "0" );
	}

	return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr="";
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[j]=='1')how1++;
	        else if(a[j]=='0')chow0++;
	        else how1 = 3;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(is0)cout<<'0';
	else
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
int n, a;
int main()
{
	cin>>n;
	int nekr = 0, how0 = 0;
	for(int i = 0; i < n; i++)
	{
	    cin >> a;
	    if(a%10==0 && a > 0)how0 += (int)log10((float)a);
	    else nekr = a;
	}
	if(how0 > 0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr;
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[j]=='1')how1++;
	        else if(a[j]=='0')chow0++;
	        else how1 = 3;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(is0)cout<<'0';
	else
	if(how0 > 0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr = 0;
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[i]=='1')how1++;
	        else if(a[i]=='0')chow0++;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(how0 > 0||is0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
int n, a;
int main()
{
	cin>>n;
	int nekr = 0, how0 = 0;
	bool is0 = false;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if((a%10==0 && a > 0 )|| a == 1)how0 += (int)log10((float)a);
	    else if(a>0)nekr = a;
	    else is0 = true;
	}
	if(how0 > 0||is0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr="1";
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[j]=='1')how1++;
	        else if(a[j]=='0')chow0++;
	        else how1 = 3;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(is0)cout<<'0';
	else
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
long long n, prod = 1;
int main()
{
	cin>>n;
	int nekr = 0, how0 = 0;
	for(int i = 0; i < n; i++)
	{
	    cin >> a;
	    if(a%10==0 && a > 0)how0 += log10(a);
	    else nekr = a;
	}
	if(how0 > 0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr;
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[j]=='1')how1++;
	        else if(a[j]=='0')chow0++;
	        else how1 = 3;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(how0 > 0||is0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
int n, a;
int main()
{
	cin>>n;
	int nekr = 0, how0 = 0;
	for(int i = 0; i < n; i++)
	{
	    cin >> a;
	    if((a%10==0 && a > 0 )|| a == 1)how0 += (int)log10((float)a);
	    else nekr = a;
	}
	if(how0 > 0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr = 0;
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[i]=='1')how1++;
	        else if(a[i]=='0')chow0++;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(how0 > 0||is0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
#include <cmath>
using namespace std;
long long n, prod = 1, a;
int main()
{
	cin>>n;
	int nekr = 0, how0 = 0;
	for(int i = 0; i < n; i++)
	{
	    cin >> a;
	    if(a%10==0 && a > 0)how0 += log10(a);
	    else nekr = a;
	}
	if(how0 > 0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <map>
using namespace std;
long long n, prod = 1;
int main()
{
	cin>>n;
	for(int i = 0; i < n; i++)
	{
	    long long a;
	    cin >> a;
	    prod *= a;
	}
	cout << prod;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <vector>
#include <limits>
#include <set>
#include <string>
#include <cmath>
using namespace std;
int n;
int main()
{
	cin>>n;
	string nekr="";
	int how0 = 0;
	bool is0 = false;
	string a;
	for(int i = 0; i < n&&!is0; i++)
	{
	    cin >> a;
	    if(a == "0")is0 = true;
	    else{
	        int how1 = 0, chow0 = 0;
	        for(int j = 0; j < a.length()&&how1 < 2; j++)
	        if(a[j]=='1')how1++;
	        else if(a[j]=='0')chow0++;
	        else how1 = 3;
	        if(how1 == 1)how0 += chow0;
	        else nekr = a;
	    }
	}
	if(how0 > 0||is0)
	{
	    cout << nekr;
	    for(int i = 0; i < how0; i++)cout << '0';
	}else
	cout << 0;
}


#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	int a,n,c=0;
	cin>>n;
	for(int i=0;i<n;i++){
		int x;cin>>x;
		if(!x){cout<<"0";break;}
		int y=x;
		int r=0;
		bool f=0;
		int z=0;
		while(y){
			z++;
			if(y%10==1)r++;
			if(y%10>1)f=1;
			y/=10;
		}
		if(f||r>=2)x=a;
		else c+=z-1;
	}
	cout<<a;
	for(int i=0;i<c;i++)
		cout<<"0";

	return 0;
}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<map>
#include<set>
#include<queue>
#include <utility>
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<map>
#include<set>
#include<queue>
#include <utility>
#include <sstream>

using namespace std;

int main() {
	long long int  n, c = 0;
	string a="1";
	cin >> n;
	for (int i = 0; i<n; i++) {
		string x; cin >> x;
		if (x=="0") { cout << "0"; return 0; }
		string y = x;
		int r = 0;
		bool f = 0;
		long long int z = 0;
		for (int i = 0; i < x.size();i++) {
			z++;
			int g = x[i] - '0';
			if (g % 10 == 1)r++;
			if (g % 10>1)f = 1;

		}
		if (f || r >= 2)a = x;
		else c += z - 1;
	}
	cout << a;
	for (long long int i = 0; i<c; i++)
		cout << "0";

	return 0;
}


#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	long long int a,n,c=0;
	cin>>n;
	for(int i=0;i<n;i++){
		long long int x;cin>>x;
		if(!x){cout<<"0";return 0;}
		long long int y=x;
		int r=0;
		bool f=0;
		long long int z=0;
		while(y){
			z++;
			if(y%10==1)r++;
			if(y%10>1)f=1;
			y/=10;
		}
		if(f||r>=2)a=x;
		else c+=z-1;
	}
	cout<<a;
	for(long long int i=0;i<c;i++)
		cout<<"0";

	return 0;
}


#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	int a,n,c=0;
	cin>>n;
	for(int i=0;i<n;i++){
		int x;cin>>x;
		if(!x){cout<<"0";return 0;}
		int y=x;
		int r=0;
		bool f=0;
		int z=0;
		while(y){
			z++;
			if(y%10==1)r++;
			if(y%10>1)f=1;
			y/=10;
		}
		if(f||r>=2)a=x;
		else c+=z-1;
	}
	cout<<a;
	for(int i=0;i<c;i++)
		cout<<"0";

	return 0;
}


#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	int a,n,c=0;
	cin>>n;
	for(int i=0;i<n;i++){
		int x;cin>>x;
		if(!x){cout<<"0";break;}
		int y=x;
		int r=0;
		bool f=0;
		int z=0;
		while(y){
			z++;
			if(y%10==1)r++;
			if(y%10>1)f=1;
			y/=10;
		}
		if(f||r>=2)a=x;
		else c+=z-1;
	}
	cout<<a;
	for(int i=0;i<c;i++)
		cout<<"0";

	return 0;
}


#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	long long int a,n,c=0;
	cin>>n;
	for(int i=0;i<n;i++){
		long long int x;cin>>x;
		if(!x){cout<<"0";return 0;}
		long long int y=x;
		int r=0;
		bool f=0;
		int z=0;
		while(y){
			z++;
			if(y%10==1)r++;
			if(y%10>1)f=1;
			y/=10;
		}
		if(f||r>=2)a=x;
		else c+=z-1;
	}
	cout<<a;
	for(int i=0;i<c;i++)
		cout<<"0";

	return 0;
}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<map>
#include<set>
#include<queue>
#include <utility>
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<map>
#include<set>
#include<queue>
#include <utility>
#include <sstream>

using namespace std;

int main() {
	long long int  n, c = 0;
	string a;
	cin >> n;
	for (int i = 0; i<n; i++) {
		string x; cin >> x;
		if (x=="0") { cout << "0"; return 0; }
		string y = x;
		int r = 0;
		bool f = 0;
		long long int z = 0;
		for (int i = 0; i < x.size();i++) {
			z++;
			int g = x[i] - '0';
			if (g % 10 == 1)r++;
			if (g % 10>1)f = 1;

		}
		if (f || r >= 2)a = x;
		else c += z - 1;
	}
	cout << a;
	for (long long int i = 0; i<c; i++)
		cout << "0";

	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n;
	cin >> n;
	string s,noBeauty;
	long long sumZero = 0;
	while (n-- > 0){
		cin >> s;
		long long  zero = 0;

		if (s == "0"){
			cout << "0" << endl;
			return 0;
		}
		for (long long i = 0; i < s.length(); ++i){
			if (s[i] == '0')zero++;
		}
		if (!(s[0] == '1'&&zero == (s.length() - 1)))
		{
			noBeauty = s;
			zero = 0;
		}
		sumZero += zero;
	}
	string zeroNum(sumZero,'0');
	noBeauty.append(zeroNum);
	cout << noBeauty << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n;
	cin >> n;
	string s,noBeauty;
	int sumZero = 0;
	while (n-- > 0){
		cin >> s;
		int zero = 0;

		if (s == "0"){
			cout << "0" << endl;
			return 0;
		}
		for (int i = 0; i < s.length(); ++i){
			if (s[i] == '0')zero++;
		}
		if (!(s[0] == '1'&&zero == (s.length() - 1)))noBeauty = s;
		sumZero += zero;
	}
	string zeroNum(sumZero,'0');
	noBeauty.append(zeroNum);
	cout << noBeauty << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n;
	cin >> n;
	string s,noBeauty;
	long long sumZero = 0;
	while (n-- > 0){
		cin >> s;
		long long  zero = 0;

		if (s == "0"){
			cout << "0" << endl;
			return 0;
		}
		for (long long i = 0; i < s.length(); ++i){
			if (s[i] == '0')zero++;
		}
		if (!(s[0] == '1'&&zero == (s.length() - 1)))noBeauty = s;
		sumZero += zero;
	}
	string zeroNum(sumZero,'0');
	noBeauty.append(zeroNum);
	cout << noBeauty << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n;
	cin >> n;
	string s,noBeauty="";
	long long sumZero = 0;
	while (n-- > 0){
		cin >> s;
		long long  zero = 0;

		if (s == "0"){
			cout << "0" << endl;
			return 0;
		}
		for (long long i = 0; i < s.length(); ++i){
			if (s[i] == '0')zero++;
		}
		if (!(s[0] == '1'&&zero == (s.length() - 1)))
		{
			noBeauty = s;
			zero = 0;
		}
		sumZero += zero;
	}
	string zeroNum(sumZero,'0');
	if (noBeauty == "")noBeauty = "1";
	noBeauty.append(zeroNum);
	cout << noBeauty << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int n;
	cin >> n;
	string s,noBeauty;
	int sumZero = 0;
	while (n-- > 0){
		cin >> s;
		int zero = 0;

		if (s == "0"){
			cout << "0" << endl;
			return 0;
		}
		for (int i = 0; i < s.length(); ++i){
			if (s[i] == '0')zero++;
		}
		if (!(s[0] == '1'&&zero == (s.length() - 1)))noBeauty = s;
		sumZero += zero;
	}
	string zeroNum(sumZero,'0');
	s.append(zeroNum);
	cout << s << endl;
	return 0;
}


// Win32Console.cpp : Defines the entry point for the console application.
//

//#include "stdafx.h"
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <iomanip>
#include <stdio.h>
#include <iterator>
#include <cstring>
#include <clocale>
#include <locale>
#include <Windows.h>
#pragma warning(disable : 4996)

typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef long double LDB;
typedef unsigned short USH;
using namespace std;

#define input(f)\
    freopen(f,"r",stdin)
#define output(f)\
    freopen(f,"w",stdout)
#define VectorCin(Vector,size)\
    for (LL i=1,inp;i<=size;i++) cin >> inp, Vector.push_back(inp);
#define VectorCout(Vector)\
    for (LL i=0;i<Vector.size();i++) cout << Vector[i] << space;
#define space " "
#define mp make_pair
#define pb push_back
#define pf push_front
#define INF 2000000007
#define LINF 40000000000000000007
#define pi 3.141592653589793

//queue <int> Q;
vector <int> V(50);
//vector<vector<int>> G;
//vector <bool> used;
//vector <pair <int, int> > VP;
//deque <int> DEQ;
//pair <int, int> P;
//list <int> L;
//set <int> S;
const int MAX = 1e6 + 9;
LL n = 0, m = 0;
LL Min = INF, Max = -INF, previous = 0;
int x = 0, y = 0, z = 0;
char c;
LL ans = 0, nul = 0, le = 0, ri = 0, sum = 0;
int t = 0, start = 0, finish = 0;
bool simple = false;
LL now = 0;
string s;

int main()
{
	//setlocale(LC_ALL, "Russian");
	//input("input.txt");output("output.txt");
	ios_base::sync_with_stdio(false);
	//cin >> n >> m;
	/*now = m;
	ans = 30;
	int j = 1;
	while (now > 0)
	{
		V[j]=now % 2;
		if (now % 2 == 1) ans--;
		now >>= 1;
		j++;
	}
	if (1 << ans < n)
	{
		cout << -1 << endl;
		return 0;
	}
	else
		rec(m, 0);*/
	cin >> n;
	string ss;
	while (n--)
	{
		cin >> s;
		x = 0;
		for (int i = 0; i < s.size(); i++)
			x += s[i] - '0';
		if (!x)
			return cout << 0 << endl , 0;
		if (x == 1)
			now += s.size() - 1;
		else
			ss = s;
	}
	cout << ss;
	for (int i = 0; i < now; i++)
		cout << 0;
	cout << endl;
	return 0;
}


// Win32Console.cpp : Defines the entry point for the console application.
//

//#include "stdafx.h"
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <iomanip>
#include <stdio.h>
#include <iterator>
#include <cstring>
#include <clocale>
#include <locale>
#include <Windows.h>
#pragma warning(disable : 4996)

typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef long double LDB;
typedef unsigned short USH;
using namespace std;

#define input(f)\
    freopen(f,"r",stdin)
#define output(f)\
    freopen(f,"w",stdout)
#define VectorCin(Vector,size)\
    for (LL i=1,inp;i<=size;i++) cin >> inp, Vector.push_back(inp);
#define VectorCout(Vector)\
    for (LL i=0;i<Vector.size();i++) cout << Vector[i] << space;
#define space " "
#define mp make_pair
#define pb push_back
#define pf push_front
#define INF 2000000007
#define LINF 40000000000000000007
#define pi 3.141592653589793

//queue <int> Q;
vector <int> V(50);
//vector<vector<int>> G;
//vector <bool> used;
//vector <pair <int, int> > VP;
//deque <int> DEQ;
//pair <int, int> P;
//list <int> L;
//set <int> S;
const int MAX = 1e6 + 9;
LL n = 0, m = 0;
LL Min = INF, Max = -INF, previous = 0;
int x = 0, y = 0, z = 0;
char c;
LL ans = 0, nul = 0, le = 0, ri = 0, sum = 0;
int t = 0, start = 0, finish = 0;
bool simple = false;
LL now = 0;
string s;

int main()
{
	//setlocale(LC_ALL, "Russian");
	//input("input.txt");output("output.txt");
	ios_base::sync_with_stdio(false);
	//cin >> n >> m;
	/*now = m;
	ans = 30;
	int j = 1;
	while (now > 0)
	{
		V[j]=now % 2;
		if (now % 2 == 1) ans--;
		now >>= 1;
		j++;
	}
	if (1 << ans < n)
	{
		cout << -1 << endl;
		return 0;
	}
	else
		rec(m, 0);*/
	cin >> n;
	string ss ="1";
	while (n--)
	{
		cin >> s;
		x = 0;
		for (int i = 0; i < s.size(); i++)
			x += s[i] - '0';
		if (!x)
			return cout << 0 << endl , 0;
		if (x == 1)
			now += s.size() - 1;
		else
			ss = s;
	}
	cout << ss;
	for (int i = 0; i < now; i++)
		cout << 0;
	cout << endl;
	return 0;
}


#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<double, double> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100010;

int n;
double x, y;
int mas[] = {1, 10, 100, 1000, 10000, 100000};
int sz[] = {0, 1, 2, 3, 4, 5};
int t;
void solve()
{
    cin >> n;
    int st = 1, deg = 0;
    for(int i = 0; i < n; ++i)
    {
        cin >> t;
        int flag = 0;
        for(int j = 0; j < 6; ++j)
        {
            if (t == mas[j])
            {
                deg += sz[j];
                flag = 1;
                break;
            }
        }
        if (!flag)
            st = t;
    }
    cout << st;
    for(int j = 0; j < deg; ++j)
        cout << 0;
}

int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));

    solve();

    return 0;
}


#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<double, double> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100010;

int n;
double x, y;
string t, st;
int deg;
void solve()
{
    cin >> n;

    int flag = 0;
    for(int i = 0; i < n; ++i)
    {
        cin >> t;
        if (t == "0")
            flag = 1;
        if (t[0] != '1')
            st = t;
        else
        {
            int fg = 0;
            for(int j = 1; j < t.size(); ++j)
            {
                if (t[j] != '0')
                    fg = 1;
            }
            if (fg)
                st = t;
            else
                deg += t.size() - 1;
        }
    }
    if (flag)
    {
        cout << 0;
           return;
       }
    cout << st;
    for(int j = 0; j < deg; ++j)
        cout << 0;
}

int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));

    solve();

    return 0;
}


#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<double, double> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100010;

int n;
double x, y;
string t, st = "1";
int deg;
void solve()
{
    cin >> n;

    int flag = 0;
    for(int i = 0; i < n; ++i)
    {
        cin >> t;
        if (t == "0")
            flag = 1;
        if (t[0] != '1')
            st = t;
        else
        {
            int fg = 0;
            for(int j = 1; j < t.size(); ++j)
            {
                if (t[j] != '0')
                    fg = 1;
            }
            if (fg)
                st = t;
            else
                deg += t.size() - 1;
        }
    }
    cout << st;
    for(int j = 0; j < deg; ++j)
        cout << 0;
}

int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));

    solve();

    return 0;
}


#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<double, double> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100010;

int n;
double x, y;
string t, st = "1";
int deg;
void solve()
{
    cin >> n;

    int flag = 0;
    for(int i = 0; i < n; ++i)
    {
        cin >> t;
        if (t == "0")
            flag = 1;
        if (t[0] != '1')
            st = t;
        else
        {
            int fg = 0;
            for(int j = 1; j < t.size(); ++j)
            {
                if (t[j] != '0')
                    fg = 1;
            }
            if (fg)
                st = t;
            else
                deg += t.size() - 1;
        }
    }
    if (flag)
    {
        cout << '0';
    }
    else
    {
        cout << st;
        for(int j = 0; j < deg; ++j)
            cout << 0;
    }
}

int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));

    solve();

    return 0;
}


#pragma comment(linker, "/STACK:64000000")

#define _USE_MATH_DEFINES
#define _CRT_NO_DERPECATE
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <memory.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>
#include <algorithm>
#include <functional>
#include <complex>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<double, double> pii;
#define sq(x) ((x)*(x))
#define INF ((int)(2e9))
#define LINF ((int64)(2e18))
#define EPS ((double)(1e-7))
#define MOD ((int64)(1e9 + 9))
#define y0 xdsf
const double PI = 6.283185307179586476925286766559;
const int MAXN = 100010;

int n;
double x, y;
string t, st;
int deg;
void solve()
{
    cin >> n;

    int flag = 0;
    for(int i = 0; i < n; ++i)
    {
        cin >> t;
        if (t == "0")
            flag = 1;
        if (t[0] != '1')
            st = t;
        else
        {
            int fg = 0;
            for(int j = 1; j < t.size(); ++j)
            {
                if (t[j] != '0')
                    fg = 1;
            }
            if (fg)
                st = t;
            else
                deg += t.size() - 1;
        }
    }
    cout << st;
    for(int j = 0; j < deg; ++j)
        cout << 0;
}

int main()
{
#ifdef _MY_DEBUG
    freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
#else
#endif
    ios_base::sync_with_stdio(false); cin.tie(0);
    srand(time(0));

    solve();

    return 0;
}


#include <iostream>
#include <algorithm>
#include <set>
#include <string>

using namespace std;

const unsigned long long MAX = 1000000000000000000;

int main()
{
	int n;
	cin >> n;
	long long nulls = 0;
	string notBeaut = "";
	bool notBeautIsFind = false;
	bool ansIsNull = false;

	for (int i = 0; i < n; i++)
	{
		string s;
		cin >> s;
		if (ansIsNull) continue;
		if (s[0] == '0')
		{
			ansIsNull = true;
			continue;
		}

		if (notBeautIsFind) nulls += s.length() - 1;
		else
		{
			if (s[0] != '1') notBeautIsFind = true;
			for (int pos = 1; pos < s.length(); pos++)
			{
				if (notBeautIsFind) break;
				if (s[pos] != '0') notBeautIsFind = true;
			}
			if (notBeautIsFind) notBeaut = s;
			else nulls += s.length() - 1;
		}
	}
	if (ansIsNull) cout << 0;
	else
	{
		if (notBeautIsFind) cout << notBeaut;
		else cout << 1;

		for (int i = 0; i < nulls; i++) cout << 0;
	}

	return 0;
}


#include <iostream>
#include <algorithm>
#include <set>
#include <string>

using namespace std;

const unsigned long long MAX = 1000000000000000000;

int main()
{
	int n;
	cin >> n;
	long long nulls = 0;
	string notBeaut = "";
	bool notBeautIsFind = false;
	bool ansIsNull = false;

	for (int i = 0; i < n; i++)
	{
		string s;
		cin >> s;
		if (ansIsNull) continue;
		if (s[0] == '0')
		{
			ansIsNull = true;
			continue;
		}

		if (notBeautIsFind) nulls += s.length() - 1;
		else
		{
			if (s[0] != '1') notBeautIsFind = true;
			for (int pos = 1; pos < s.length(); pos++)
			{
				if (notBeautIsFind) break;
				if (s[pos] != '0') notBeautIsFind = true;
			}
			if (notBeautIsFind) notBeaut = s;
			else nulls += s.length() - 1;
		}
	}
	if (ansIsNull) cout << 0;
	else
	{
		cout << notBeaut;
		for (int i = 0; i < nulls; i++) cout << 0;
	}

	return 0;
}


# include <iostream>
# include <sstream>
# include <cstdio>
# include <cstdlib>
# include <algorithm>
# include <string>
# include <cstring>
# include <cmath>
# include <stack>
# include <queue>
# include <vector>
# include <list>
# include <map>
# include <set>
# include <deque>
# include <iterator>
# include <functional>
# include <bitset>
# include <climits>
# include <ctime>
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define odd(x) (x&1)
typedef long long ll;
typedef long double ld;
const ll oo = 2 * 1000 * 1000 * 1000;
const int _cnt = 1000 * 1000;
const int _p = 1000 * 1000 * 1000 + 7;
ll o(ll x) { return x%_p; }
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
int lcm(int a, int b) { return a*b / gcd(a, b); }
using namespace std;

void file_put() {
	freopen("filename.in", "r", stdin);
	freopen("filename.out", "w", stdout);
}

string st, s;
int n, t, sum = 0;

int check(string st) {
	if (st[0] != '1') return -1;
	int t = st.length() - 1;
	while (st[t] == '0') t--;
	if (t == 0) return st.length() - 1; else
		return -1;
}

int main() {
	//file_put();

	scanf("%d", &n);
	s = "";
	for (int i = 1; i <= n; i++) {
		cin.ignore();
		cin >> st;
		if (st == "0") {
			cout << 0 << endl;
			return 0;
		}
		t = check(st);
		if (t >= 0) {
			sum += t;
			continue;
		}
		else
			s = st;
	}
	cout << s;
	for (int i = 1; i <= sum; i++) printf("0");
	printf("\n");

	return 0;
}


# include <iostream>
# include <sstream>
# include <cstdio>
# include <cstdlib>
# include <algorithm>
# include <string>
# include <cstring>
# include <cmath>
# include <stack>
# include <queue>
# include <vector>
# include <list>
# include <map>
# include <set>
# include <deque>
# include <iterator>
# include <functional>
# include <bitset>
# include <climits>
# include <ctime>
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define odd(x) (x&1)
typedef long long ll;
typedef long double ld;
const ll oo = 2 * 1000 * 1000 * 1000;
const int _cnt = 1000 * 1000;
const int _p = 1000 * 1000 * 1000 + 7;
ll o(ll x) { return x%_p; }
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
int lcm(int a, int b) { return a*b / gcd(a, b); }
using namespace std;

void file_put() {
	freopen("filename.in", "r", stdin);
	freopen("filename.out", "w", stdout);
}

string st, s;
int n, t, sum = 0;

int check(string st) {
	if (st[0] != '1') return -1;
	int t = st.length() - 1;
	while (st[t] == '0') t--;
	if (t == 0) return st.length() - 1; else
		return -1;
}

int main() {
	//file_put();

	scanf("%d", &n);
	s = "";
	for (int i = 1; i <= n; i++) {
		cin.ignore();
		cin >> st;
		if (st == "0") {
			cout << 0 << endl;
			return 0;
		}
		t = check(st);
		if (t >= 0) {
			sum += t;
			continue;
		}
		else
			s = st;
	}
	if (s == "") s = "1";
	cout << s;
	for (int i = 1; i <= sum; i++) printf("0");
	printf("\n");

	return 0;
}


#include<iostream>
#include<string>
using namespace std;
int ans = 0;
string ss="";
int main()
{
    int n;
    bool fl = true;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        if (s == "0")
        {
            fl = false;
        }
        int l = 0;
        for (int j = 0; j < s.size(); j++)
        {
            if (s[j] == '0')
                l++;
        }
        if (l == s.size() - 1 && s[0] == '1')
        {
            ans += l;
        } else
            ss = s;
    }
    if (!fl)
    {
        cout << 0;
        return 0;
    }
    if (ss == "")
    {
        cout << 1;
        for (int i = 0; i < ans; i++)
            cout << 0;
    } else
    {
        cout << ss;
        for (int i = 0; i < ans; i++)
            cout << 0;
    }
}


#include<iostream>
#include<string>
using namespace std;
int ans = 0;
string ss="";
int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        string s;
        cin >> s;

        int l = 0;
        for (int j = 0; j < s.size(); j++)
        {
            if (s[j] == '0')
                l++;
        }
        if (l == s.size() - 1 && s[0] == '1')
        {
            ans += l;
        } else
            ss = s;
    }
    if (ss == "")
    {
        cout << 1;
        for (int i = 0; i < ans; i++)
            cout << 0;
    } else
    {
        cout << ss;
        for (int i = 0; i < ans; i++)
            cout << 0;
    }
}


#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <map>
#include <iostream>
#include <utility>
#include <set>
#include <algorithm>
#include <bitset>
#include <queue>
#include <functional>
#include <assert.h>
#include <ctime>
#define SI(i) scanf("%d", &i)
#define SII(i,j) scanf("%d%d", &i, &j)
#define SIII(i,j, k) scanf("%d%d%d", &i, &j, &k)
#define SL(i) scanf("%I64d", &i)
#define SLL(i,j) scanf("%I64d%I64d", &i, &j)
#define SLLL(i,j, k) scanf("%I64d%I64d%I64d", &i, &j, &k)
#define SS(i) scanf("%s\n", i)
#define SSS(i,j) scanf("%s %s", i, j)
#define SC(i) scanf("%d", &i)
#define SCC(i,j) scanf("%c %c\n", &i, &j)

#define PI(i) printf("%d ", i)
#define PII(i,j) printf("%d %d ", i, j)
#define PL(i) printf("%I64d ", i)
#define PLL(i,j) printf("%I64d %I64d ", i, j)
#define PS(i) printf("%s", i)
#define PSS(i,j) printf("%s %s ", i, j)
#define PC(i) printf("%c", i)
#define PCC(i,j) printf("%c %c ", i, j)
#define PN printf("\n")
#define forin(i, k, n) for(int i = (k); i < (n); ++i)
#define forin2(i, k, n) for(int i = (k); i <= (n); ++i)
#define rforin(i, k, n) for(int i = (k); i > (n); --i)
#include <functional>   // std::greater
#include <algorithm>    // std::sort
#include <vector>
int n, sz;
char s[100001], ans[100002];
bool was, sp;
int main() {
#ifdef _DEBUG
	freopen("1.in", "rt", stdin);
	freopen("1.out", "wt", stdout);
	clock_t timer = clock();
#endif
	SI(n);
	forin(ns, 0, n)
	{
		SS(s);
		sz += strlen(s) - 1;
		if (!strcmp(s, "0"))
		{
			PS("0");
			return 0;
		}
		if (sp)
			continue;
		was = false;
		for (int i = 0; s[i] != '\0'; ++i)
		{
			ans[i] = s[i];
			if (s[i] > '1')
				sp = true;
			if (s[i] == '1')
			{
				if (was)
					sp = true;
				was = true;
			}
		}
		ans[strlen(s)] = '\0';
		if (sp)
			sz -= strlen(s) - 1;
	}
	if (!sp)
	{
		ans[0] = '1';
		ans[1] = '\0';
	}
	for(int i = strlen(ans), j = 0; j < sz; ++i, ++j)
		ans[i] = '0';
	PS(ans);
#ifdef _DEBUG
	//cout << (std::clock() - timer) / (double)CLOCKS_PER_SEC;
#endif
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <map>
#include <iostream>
#include <utility>
#include <set>
#include <algorithm>
#include <bitset>
#include <queue>
#include <functional>
#include <assert.h>
#include <ctime>
#define SI(i) scanf("%d", &i)
#define SII(i,j) scanf("%d%d", &i, &j)
#define SIII(i,j, k) scanf("%d%d%d", &i, &j, &k)
#define SL(i) scanf("%I64d", &i)
#define SLL(i,j) scanf("%I64d%I64d", &i, &j)
#define SLLL(i,j, k) scanf("%I64d%I64d%I64d", &i, &j, &k)
#define SS(i) scanf("%s\n", i)
#define SSS(i,j) scanf("%s %s", i, j)
#define SC(i) scanf("%d", &i)
#define SCC(i,j) scanf("%c %c\n", &i, &j)

#define PI(i) printf("%d ", i)
#define PII(i,j) printf("%d %d ", i, j)
#define PL(i) printf("%I64d ", i)
#define PLL(i,j) printf("%I64d %I64d ", i, j)
#define PS(i) printf("%s", i)
#define PSS(i,j) printf("%s %s ", i, j)
#define PC(i) printf("%c", i)
#define PCC(i,j) printf("%c %c ", i, j)
#define PN printf("\n")
#define forin(i, k, n) for(int i = (k); i < (n); ++i)
#define forin2(i, k, n) for(int i = (k); i <= (n); ++i)
#define rforin(i, k, n) for(int i = (k); i > (n); --i)
#include <functional>   // std::greater
#include <algorithm>    // std::sort
#include <vector>
int n, ind, tms;
char s[100001], ans[100002], tmp;
bool is, was;
int main() {
#ifdef _DEBUG
	freopen("1.in", "rt", stdin);
	freopen("1.out", "wt", stdout);
	clock_t timer = clock();
#endif
	SI(n);
	forin(i, 0, 100002)
		ans[i] = '0';
	ans[100001] = '1';
	ind = 100001;
	forin(ns, 0, n)
	{
		SS(s);
		if (is || (strlen(s) == 1 && s[0] < '2'))
		{
			if (s[0] == '0')
			{
				is = true;
				ans[0] = '0';
				ans[1] = '\0';
				ind = 0;
			}
			continue;
		}
		was = true;
		for (int i = strlen(s) - 1, j = 0; i >= 0; --i, ++j)
		{
			if (s[i] == '0')
				continue;
			for (int ii = ind, jj = 0; ii < 100002; ++ii)
			{
				if (ans[ii] == '0')
					continue;
				tmp = ans[ii];
				if (i == 0)
				{
					ans[ii - j] = tmp + s[0] - '1';
					if(j > 0)
						ans[ii] = '0';
					continue;
				}
				for (int iii = i; iii >= 0; --iii)
				{
					ans[ind - j - jj] = tmp + s[iii] - '1';
					++jj;
					if (s[iii + 1] == '0')
						ans[ii] = '0';
					if (i == 0)
						break;
				}
			}
			if(was)
				ind -= strlen(s) - 1;
			if (i > 0)
				break;
			was = false;
		}
	}
	PS(ans + ind);
#ifdef _DEBUG
	//cout << (std::clock() - timer) / (double)CLOCKS_PER_SEC;
#endif
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <map>
#include <iostream>
#include <utility>
#include <set>
#include <algorithm>
#include <bitset>
#include <queue>
#include <functional>
#include <assert.h>
#include <ctime>
#include <utility>
#define SI(i) scanf("%d", &i)
#define SII(i,j) scanf("%d%d", &i, &j)
#define SIII(i,j, k) scanf("%d%d%d", &i, &j, &k)
#define SL(i) scanf("%I64d", &i)
#define SLL(i,j) scanf("%I64d%I64d", &i, &j)
#define SLLL(i,j, k) scanf("%I64d%I64d%I64d", &i, &j, &k)
#define SS(i) scanf("%s\n", i)
#define SSS(i,j) scanf("%s %s", i, j)
#define SC(i) scanf("%d", &i)
#define SCC(i,j) scanf("%c %c\n", &i, &j)

#define PI(i) printf("%d ", i)
#define PII(i,j) printf("%d %d ", i, j)
#define PL(i) printf("%I64d ", i)
#define PLL(i,j) printf("%I64d %I64d ", i, j)
#define PS(i) printf("%s", i)
#define PSS(i,j) printf("%s %s ", i, j)
#define PC(i) printf("%c", i)
#define PCC(i,j) printf("%c %c ", i, j)
#define PN printf("\n")
#define forin(i, k, n) for(int i = (k); i < (n); ++i)
#define forin2(i, k, n) for(int i = (k); i <= (n); ++i)
#define rforin(i, k, n) for(int i = (k); i > (n); --i)
using namespace std;
#define PI 3.14159265359
int n;
unsigned long long lmt = 18446744073709551615, ans, a;
int main() {
#ifdef _DEBUG
	freopen("1.in", "rt", stdin);
	freopen("1.out", "wt", stdout);
	clock_t timer = clock();
#endif
	ans = 1LL;
	SI(n);
	forin(i, 0, n)
	{
		SL(a);
		ans *= a;
	}
	cout << ans;
#ifdef _DEBUG
	//cout << (std::clock() - timer) / (double)CLOCKS_PER_SEC;
#endif
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <map>
#include <iostream>
#include <utility>
#include <set>
#include <algorithm>
#include <bitset>
#include <queue>
#include <functional>
#include <assert.h>
#include <ctime>
#define SI(i) scanf("%d", &i)
#define SII(i,j) scanf("%d%d", &i, &j)
#define SIII(i,j, k) scanf("%d%d%d", &i, &j, &k)
#define SL(i) scanf("%I64d", &i)
#define SLL(i,j) scanf("%I64d%I64d", &i, &j)
#define SLLL(i,j, k) scanf("%I64d%I64d%I64d", &i, &j, &k)
#define SS(i) scanf("%s\n", i)
#define SSS(i,j) scanf("%s %s", i, j)
#define SC(i) scanf("%d", &i)
#define SCC(i,j) scanf("%c %c\n", &i, &j)

#define PI(i) printf("%d ", i)
#define PII(i,j) printf("%d %d ", i, j)
#define PL(i) printf("%I64d ", i)
#define PLL(i,j) printf("%I64d %I64d ", i, j)
#define PS(i) printf("%s", i)
#define PSS(i,j) printf("%s %s ", i, j)
#define PC(i) printf("%c", i)
#define PCC(i,j) printf("%c %c ", i, j)
#define PN printf("\n")
#define forin(i, k, n) for(int i = (k); i < (n); ++i)
#define forin2(i, k, n) for(int i = (k); i <= (n); ++i)
#define rforin(i, k, n) for(int i = (k); i > (n); --i)
#include <functional>   // std::greater
#include <algorithm>    // std::sort
#include <vector>
int n, ind;
char s[100001], ans[100002];
bool is;
int main() {
#ifdef _DEBUG
	freopen("1.in", "rt", stdin);
	freopen("1.out", "wt", stdout);
	clock_t timer = clock();
#endif
	SI(n);
	forin(i, 0, 100002)
		ans[i] = '0';
	ans[100001] = '1';
	ind = 100001;
	forin(ii, 0, n)
	{
		SS(s);
		if (is || (strlen(s) == 1 && s[0] < '2'))
		{
			if (s[0] == '0')
			{
				is = true;
				ans[0] = '0';
				ans[1] = '\0';
				ind = 0;
			}
			continue;
		}
		for (int i = strlen(s) - 1, j = 0; i >= 0; --i, ++j)
		{
			if (s[i] == '0')
				continue;
			for (int ii = ind; ii < 100002; ++ii)
			{
				if (ans[ii] == '0')
					continue;
				ans[ind - j] = ans[ii] + s[i] - '1';
				if (s[i + 1] == '0')
					ans[ii] = '0';
			}
			ind -= j;
		}
	}
	PS(ans+ind);
#ifdef _DEBUG
	//cout << (std::clock() - timer) / (double)CLOCKS_PER_SEC;
#endif
	return 0;
}


#include <iostream>
#include <limits.h>
#include <fstream>
#include <vector>
#include <string>
using namespace std;

typedef long long ll;

//#define cin ff
#ifdef cin
ifstream ff("file.txt");
#endif

bool checkstring(string &str){
	int _count = 0;
	for (int i = 0; i < str.length(); i++){
		if (str[i] == '1')
			_count++;
	}
	if (_count == 1)
		return true;
	else
		return false;
}

int main(){
	int n;
	cin >> n;
	ios_base::sync_with_stdio(0);
	//cin.tie(0);
	vector <string> vs(n);
	bool NullAnsw = false;
	int countNull = 0;
	string NotButifull;
	for (int i = 0; i < n; i++){
		cin >> vs[i];
		if (vs[i] == "0")
			NullAnsw = true;
		else if (vs[i][0] == '1'){
			if (checkstring(vs[i])==true)
				countNull += vs[i].size() - 1;
			else
				NotButifull = vs[i];
		}
		else
			NotButifull = vs[i];
	}
	if (NullAnsw == true)
		cout << 0 << endl;
	else{
		cout << NotButifull;
		while (countNull--)
			putchar('0');
	}
	return 0;
}