int main()
{
  int flag[3] = {0};
  int n;
  int m;
  int num;
  int min_num;
  int a[2] = {0};
  
  int num = 0;
  int min_num = 0;
  while (scanf("%d %d", &n, &m) != EOF)
  {
    if (n == 3)
	  num += m;
    else if (n == 2)
	  num += m * 10;
    else
	  num += m * 100;
  }  
  printf(num);
  
  return 0;
}