public static void main ( String [ ] $ ) {
  int r = scanner . nextInt ( ) , c = scanner . nextInt ( ) , k = scanner . nextInt ( ) , s [ ] [ ] = java . util . stream . IntStream . range ( 0 , r ) . mapToObj ( i -> scanner . next ( ) . chars ( ) . toArray ( ) ) . toArray ( int [ ] [ ] :: new ) , a [ ] [ ] = new int [ r ] [ c ] ;
  java . util . stream . IntStream . range ( 0 , c ) . map ( i -> java . util . stream . IntStream . range ( 0 , r ) . reduce ( 0 , ( t , j ) -> a [ j ] [ i ] = s [ j ] [ i ] == 'x' ? 0 : t + 1 ) + java . util . stream . IntStream . range ( 0 , r ) . reduce ( 0 , ( t , j ) -> a [ r - j - 1 ] [ i ] = Math . min ( a [ r - j - 1 ] [ i ] , s [ r - j - 1 ] [ i ] == 'x' ? 0 : t + 1 ) ) ) . count ( ) ;
  System . out . println ( java . util . stream . IntStream . rangeClosed ( k - 1 , r - k ) . mapToLong ( i -> java . util . stream . IntStream . range ( 0 , c - k * 2 + 2 ) . filter ( j -> java . util . stream . IntStream . range ( 0 , k * 2 - 1 ) . allMatch ( l -> a [ i ] [ j + l ] >= Math . min ( l + 1 , k * 2 - l - 1 ) ) ) . count ( ) ) . sum ( ) ) ;
}

public static void main ( String [ ] $ ) { int r = scanner . nextInt ( ) , c = scanner . nextInt ( ) , k = scanner . nextInt ( ) , s [ ] [ ] = java . util . stream . IntStream . range ( 0 , r ) . mapToObj ( i -> scanner . next ( ) . chars ( ) . toArray ( ) ) . toArray ( int [ ] [ ] :: new ) , a [ ] [ ] = new int [ r ] [ c ] ; java . util . stream . IntStream . range ( 0 , c ) . map ( i -> java . util . stream . IntStream . range ( 0 , r ) . reduce ( 0 , ( t , j ) -> a [ j ] [ i ] = s [ j ] [ i ] == ' x ' ? 0 : t + 1 ) + java . util . stream . IntStream . range ( 0 , r ) . reduce ( 0 , ( t , j ) -> a [ r - j - 1 ] [ i ] = Math . min ( a [ r - j - 1 ] [ i ] , s [ r - j - 1 ] [ i ] == ' x ' ? 0 : t + 1 ) ) ) . count ( ) ; System . out . println ( java . util . stream . IntStream . rangeClosed ( k - 1 , r - k ) . mapToLong ( i -> java . util . stream . IntStream . range ( 0 , c - k * 2 + 2 ) . filter ( j -> java . util . stream . IntStream . range ( 0 , k * 2 - 1 ) . allMatch ( l -> a [ i ] [ j + l ] >= Math . min ( l + 1 , k * 2 - l - 1 ) ) ) . count ( ) ) . sum ( ) ) ; }
(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: (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))) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (method_invocation object: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list))))) name: (identifier) arguments: (argument_list (method_reference (array_type element: (integral_type) dimensions: (dimensions)))))) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (expression_statement (method_invocation object: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (binary_expression left: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal) (lambda_expression parameters: (inferred_parameters (identifier) (identifier)) body: (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (ternary_expression condition: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (character_literal)) consequence: (decimal_integer_literal) alternative: (binary_expression left: (identifier) right: (decimal_integer_literal))))))) right: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal) (lambda_expression parameters: (inferred_parameters (identifier) (identifier)) body: (assignment_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) index: (identifier)) (ternary_expression condition: (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) index: (identifier)) right: (character_literal)) consequence: (decimal_integer_literal) alternative: (binary_expression left: (identifier) right: (decimal_integer_literal))))))))))))) name: (identifier) arguments: (argument_list))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (identifier)))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (method_invocation object: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal)))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (method_invocation object: (method_invocation object: (field_access object: (field_access object: (field_access object: (identifier) field: (identifier)) field: (identifier)) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)))) name: (identifier) arguments: (argument_list (lambda_expression parameters: (identifier) body: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)) right: (decimal_integer_literal))))))))))) name: (identifier) arguments: (argument_list))))) name: (identifier) arguments: (argument_list)))))))