public static void main ( String [ ] args ) throws IOException {
  str = br . readLine ( ) ;
  StringBuilder sb = new StringBuilder ( ) ;
  for ( int i = 0 , j ;
  i < str . length ( ) ;
  ++ i ) {
    if ( str . charAt ( i ) == '/' ) {
      j = i ;
      while ( j < str . length ( ) && str . charAt ( j ) == '/' ) {
        ++ j ;
      }
      sb . append ( str . charAt ( i ) ) ;
      i = j - 1 ;
    }
    else {
      sb . append ( str . charAt ( i ) ) ;
    }
  }
  int k = sb . length ( ) - 1 ;
  bw . write ( sb . length ( ) > 1 && sb . charAt ( k ) == '/' ? sb . substring ( 0 , k ) : sb . toString ( ) ) ;
  bw . close ( ) ;
}

public static void main ( String [ ] args ) throws IOException { str = br . readLine ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 , j ; i < str . length ( ) ; ++ i ) { if ( str . charAt ( i ) == ' / ' ) { j = i ; while ( j < str . length ( ) && str . charAt ( j ) == ' / ' ) { ++ j ; } sb . append ( str . charAt ( i ) ) ; i = j - 1 ; } else { sb . append ( str . charAt ( i ) ) ; } } int k = sb . length ( ) - 1 ; bw . write ( sb . length ( ) > 1 && sb . charAt ( k ) == ' / ' ? sb . substring ( 0 , k ) : sb . toString ( ) ) ; bw . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)))) body: (block (expression_statement (update_expression (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (ternary_expression condition: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal))) consequence: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))) alternative: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))