static long find ( char [ ] x , int len , int curr ) {
  if ( len == 0 ) return 0 ;
  if ( x [ curr ] == '1' ) {
    return ( ( pow_2 [ len - 1 ] * pow_2 [ len - 1 ] ) % mod + ( 2 * find ( x , len - 1 , curr + 1 ) ) % mod ) % mod ;
  }
  else {
    return ( 2 * ( find ( x , len - 1 , curr + 1 ) % mod ) ) % mod ;
  }
}

static long find ( char [ ] x , int len , int curr ) { if ( len == 0 ) return 0 ; if ( x [ curr ] == '1' ) { return ( ( pow_2 [ len - 1 ] * pow_2 [ len - 1 ] ) % mod + ( 2 * find ( x , len - 1 , curr + 1 ) ) % mod ) % mod ; } else { return ( 2 * ( find ( x , len - 1 , curr + 1 ) % mod ) ) % mod ; } }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) consequence: (block (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) right: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)))))) right: (identifier)))) right: (identifier)))) alternative: (block (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (identifier))))) right: (identifier)))))))