public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int ans = 0 ;
  int n = sc . nextInt ( ) , m = sc . nextInt ( ) , k = sc . nextInt ( ) ;
  boolean po [ ] [ ] = new boolean [ n ] [ m ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    String [ ] s = sc . next ( ) . split ( "" , 0 ) ;
    for ( int j = 0 ;
    j < m ;
    j ++ ) po [ i ] [ j ] = ( s [ j ] . equals ( "o" ) ) ? true : false ;
  }
  int [ ] [ ] oo = new int [ n ] [ m ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    for ( int j = 0 ;
    j < m ;
    j ++ ) {
      int min = 0 , max = 0 ;
      int in = i ;
      while ( in >= 0 && po [ in ] [ j ] ) {
        in -- ;
        min ++ ;
      }
      in = i ;
      while ( in < n && po [ in ] [ j ] ) {
        in ++ ;
        max ++ ;
      }
      oo [ i ] [ j ] = Math . min ( min , max ) ;
    }
  }
  for ( int i = k - 1 ;
  i < n - k + 1 ;
  i ++ ) for ( int j = k - 1 ;
  j < m - k + 1 ;
  j ++ ) {
    boolean d = true ;
    for ( int a = 0 ;
    a < k ;
    a ++ ) {
      d = d && ( oo [ i ] [ j - a ] >= k - a ) && ( oo [ i ] [ j + a ] >= k - a ) ;
    }
    if ( d ) ans ++ ;
  }
  System . out . println ( ans ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int ans = 0 ; int n = sc . nextInt ( ) , m = sc . nextInt ( ) , k = sc . nextInt ( ) ; boolean po [ ] [ ] = new boolean [ n ] [ m ] ; for ( int i = 0 ; i < n ; i ++ ) { String [ ] s = sc . next ( ) . split ( " " , 0 ) ; for ( int j = 0 ; j < m ; j ++ ) po [ i ] [ j ] = ( s [ j ] . equals ( " o " ) ) ? true : false ; } int [ ] [ ] oo = new int [ n ] [ m ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { int min = 0 , max = 0 ; int in = i ; while ( in >= 0 && po [ in ] [ j ] ) { in -- ; min ++ ; } in = i ; while ( in < n && po [ in ] [ j ] ) { in ++ ; max ++ ; } oo [ i ] [ j ] = Math . min ( min , max ) ; } } for ( int i = k - 1 ; i < n - k + 1 ; i ++ ) for ( int j = k - 1 ; j < m - k + 1 ; j ++ ) { boolean d = true ; for ( int a = 0 ; a < k ; a ++ ) { d = d && ( oo [ i ] [ j - a ] >= k - a ) && ( oo [ i ] [ j + a ] >= k - a ) ; } if ( d ) ans ++ ; } System . out . println ( ans ) ; }
(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 (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (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: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal) (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: (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (ternary_expression condition: (parenthesized_expression (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (true) alternative: (false))))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (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: (identifier)) update: (update_expression (identifier)) body: (block (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 (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (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 (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))) right: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (expression_statement (update_expression (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))