public static void process ( ) throws IOException {
  String s = nln ( ) . trim ( ) ;
  char ch [ ] = s . toCharArray ( ) ;
  int n = ch . length ;
  int a [ ] = new int [ n ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    if ( i == 0 ) {
      a [ i ] = 0 ;
    }
    else {
      if ( ch [ i ] == 'v' && ch [ i ] == ch [ i - 1 ] ) {
        a [ i ] = a [ i - 1 ] + 1 ;
      }
      else {
        a [ i ] = a [ i - 1 ] ;
      }
    }
  }
  int x = a [ n - 1 ] ;
  long ans = 0l ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    if ( ch [ i ] == 'o' ) {
      ans += ( ( ( long ) a [ i ] ) * ( x - a [ i ] ) ) ;
    }
  }
  pn ( ans ) ;
}

public static void process ( ) throws IOException { String s = nln ( ) . trim ( ) ; char ch [ ] = s . toCharArray ( ) ; int n = ch . length ; int a [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { if ( i == 0 ) { a [ i ] = 0 ; } else { if ( ch [ i ] == ' v ' && ch [ i ] == ch [ i - 1 ] ) { a [ i ] = a [ i - 1 ] + 1 ; } else { a [ i ] = a [ i - 1 ] ; } } } int x = a [ n - 1 ] ; long ans = 0l ; for ( int i = 0 ; i < n ; i ++ ) { if ( ch [ i ] == ' o ' ) { ans += ( ( ( long ) a [ i ] ) * ( x - a [ i ] ) ) ; } } pn ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) 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: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal)) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (cast_expression type: (integral_type) value: (array_access array: (identifier) index: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))))))))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))