public static void main ( String [ ] args ) {
  FastReader sc = new FastReader ( ) ;
  int N = sc . nextInt ( ) ;
  double [ ] x = new double [ N ] ;
  double sum = 0 ;
  String [ ] u = new String [ N ] ;
  for ( int i = 0 ;
  i < u . length ;
  i ++ ) {
    x [ i ] = sc . nextDouble ( ) ;
    u [ i ] = sc . next ( ) ;
  }
  for ( int i = 0 ;
  i < u . length ;
  i ++ ) {
    if ( u [ i ] . equals ( "JPY" ) ) {
      sum += x [ i ] ;
    }
    else {
      sum += x [ i ] * 380000.0 ;
    }
  }
  PrintWriter out = new PrintWriter ( System . out ) ;
  out . print ( sum ) ;
  out . flush ( ) ;
}

public static void main ( String [ ] args ) { FastReader sc = new FastReader ( ) ; int N = sc . nextInt ( ) ; double [ ] x = new double [ N ] ; double sum = 0 ; String [ ] u = new String [ N ] ; for ( int i = 0 ; i < u . length ; i ++ ) { x [ i ] = sc . nextDouble ( ) ; u [ i ] = sc . next ( ) ; } for ( int i = 0 ; i < u . length ; i ++ ) { if ( u [ i ] . equals ( " JPY " ) ) { sum += x [ i ] ; } else { sum += x [ i ] * 380000.0 ; } } PrintWriter out = new PrintWriter ( System . out ) ; out . print ( sum ) ; out . flush ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_floating_point_literal)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))