#include <iostream>
using namespace std;
int main()
{ int n, x, i, j, s;
s=0;
cin>>n;
{ for( i=1; i<=n; i++ )
cin>>x;
while(x>9)
{ x=x/10; }
for( j=1; j<=i-1; j++ )
x=x*10;
s=s+x; }
cout<<s;
return 0; }
Acum am vazut poza.