#include <stdio.h>
#include <stdbool.h>
#include <string.h>
int main(void)
{
  bool encore;
  int somme = 0;
  int nombre;
  char rep[6];
  do{
    scanf("%d",&nombre);
    somme += nombre;
    scanf("%s",&rep);
    encore = (strcmp(rep,"true") == 0);
  } while (encore);
  printf("Somme = %d\n",somme);
}

