#[allow(unused_macros)]
macro_rules! my_write {
  ($writer:expr, $arg:expr) => {
    $writer.write($arg).unwrap()
  };
  ($writer:expr, $arg:expr,) => {
    my_write!($writer, $arg)
  };
  ($writer:expr, $($arg:expr),+ $(,)?) => {
    {
      let mut buf = Vec::new();
      $(buf.write($arg).unwrap();)+
      $writer.write(&buf).unwrap()
    }
  };
}

use std::io::{ stdin, stdout, Write };

#[inline(always)]
fn abc173_c() {
  let stdin  = stdin();
  let stdout = stdout();
  let mut scanner = my::Scanner::with_capacity(12, stdin.lock());
  #[allow(unused_variables, unused_mut)]
  let mut writer  = stdout.lock();
  #[allow(unused_variables, unused_mut)]
  let mut itoa    = my::ItoA::with_capacity(10);

  #[allow(dead_code)]
  const WHITE : u8 = b'.';
  #[allow(dead_code)]
  const BLACK : u8 = b'#';
  #[allow(dead_code)]
  const RED   : u8 = 0;

  let h = my::atoi::<usize>(scanner.read_until(my::SP));
  let w = my::atoi::<usize>(scanner.read_until(my::SP));
  let k = my::atoi::<usize>(scanner.read_until(my::LF));

  let mut total_black = 0;

  let orig = scanner.fold(h, my::LF, Vec::with_capacity(h), | mut v, s | {
    let cnt = s.iter().filter(| x | **x == BLACK).count() as u8;
    total_black += cnt;

    let mut x = s.to_vec();
    x.insert(0, cnt);
    v.push(x);
    v
  });

  let mut ans = 0;
  let row = 2 << (h - 1);
  let col = 2 << (w - 1);

  for i in 0..row {
    for j in 0..col {
      let mut cnt    = 0;
      let mut vec    = orig.to_vec();
      let mut remain = total_black;

      for k in 0..h {
        if ((i >> k) & 0x01) == 1 {
          remain -= vec[k][0];
          vec[k][0] = 0;
        }
      }
      if (remain as usize) < k {
        continue;
      }

      for k in 0..w {
        if ((j >> k) & 0x01) == 1 {
          for l in 0..h {
            vec[l][k + 1] = RED;
          }
        }
      }

      for k in 0..h {
        if vec[k][0] == 0 {
          continue;
        }

        for l in 0..w {
          if vec[k][l + 1] == BLACK {
            cnt += 1;
          }
        }
      }
      if cnt == k {
        ans += 1;
      }
    }
  }

  my_write!(writer, itoa.from_usize(ans), b"\n");
  writer.flush().unwrap();
}

fn main() {
  abc173_c();
}

//------------------------------------------------------------------------
mod my {
  use std::ops::{ Add, Sub, Mul };

  #[allow(dead_code)]
  pub const SP: u8 = b' ';
  #[allow(dead_code)]
  pub const LF: u8 = b'\n';

  //----------------------------------------------------------------------
  #[allow(dead_code)]
  pub fn atoi<T>(s: &[u8]) -> T
    where T: Add<Output=T> +
             Sub<Output=T> +
             Mul<Output=T> +
             Default +
             From<u8> +
             ::std::fmt::Debug
  {
    let n = T::default();

    if s.is_empty() {
      return n;
    }

    match s[0] {
      b'+' => s[1..].iter().fold(n, | acc, x | { (acc * T::from(10)) + T::from(x - b'0') }),
      b'-' => s[1..].iter().fold(n, | acc, x | { (acc * T::from(10)) - T::from(x - b'0') }),
      _    => s[0..].iter().fold(n, | acc, x | { (acc * T::from(10)) + T::from(x - b'0') }),
    }
  }

  //----------------------------------------------------------------------
  macro_rules! pub_fn_ItoA_from_ty {
    ($($name:ident => $_type:ty),+ $(,)?) => {$(
      #[allow(dead_code)]
      #[allow(unused_comparisons)]
      #[inline(always)]
      pub fn $name(&mut self, mut n: $_type) -> &[u8] {
        self.buf.clear();
        if n == 0 {
          self.buf.push(b'0');
          return self.buf.as_slice();
        }

        let mut is_negative = false;
        if n < 0 {
          is_negative = true;
          n = !n + 1;
        }

        while n > 0 {
          self.buf.push((n % 10) as u8 + b'0');
          n /= 10;
        }
        if is_negative {
          self.buf.push(b'-');
        }
        self.buf.reverse();
        self.buf.as_slice()
      }
    )+};
  }

  #[derive(Debug)]
  pub struct ItoA {
    buf: Vec<u8>,
  }

  impl ItoA {
    #[allow(dead_code)]
    #[inline(always)]
    pub fn with_capacity(cap: usize) -> Self {
      ItoA {
        buf: Vec::with_capacity(cap),
      }
    }

    pub_fn_ItoA_from_ty!(
      from_usize => usize,
      from_u8    => u8,
      from_u16   => u16,
      from_u32   => u32,
      from_u64   => u64,
      from_u128  => u128,
      from_isize => isize,
      from_i8    => i8,
      from_i16   => i16,
      from_i32   => i32,
      from_i64   => i64,
      from_i128  => i128,
    );
  } // impl ItoA

  //----------------------------------------------------------------------
  #[derive(Debug)]
  pub struct Scanner<R> {
    reader: R,
    buf   : Vec<u8>,
  }

  impl<R> Scanner<R>
    where R: ::std::io::BufRead
  {
    #[allow(dead_code)]
    #[inline(always)]
    pub fn with_capacity(cap: usize, reader: R) -> Self {
      Scanner {
        reader: reader,
        buf   : Vec::with_capacity(cap),
      }
    }

    #[allow(dead_code)]
    #[inline(always)]
    pub fn read_until(&mut self, delim: u8) -> &[u8] {
      self.buf.clear();
      let mut len = self.reader.read_until(delim, &mut self.buf).unwrap();
      if len == 0 {
        return self.buf.as_slice();
      }

      len -= 1;
      if self.buf[len] == delim {
        self.buf.truncate(len);
      }
      self.buf.as_slice()
    }

    #[allow(dead_code)]
    #[inline(always)]
    pub fn for_each<F>(&mut self, n: usize, delim: u8, mut func: F)
      where F: FnMut(&[u8])
    {
      for _ in 0..n - 1 {
        func(self.read_until(delim));
      }
      func(self.read_until(LF))
    }

    #[allow(dead_code)]
    #[inline(always)]
    pub fn fold<B, F>(&mut self, n: usize, delim: u8, mut init: B, mut func: F) -> B
      where F: FnMut(B, &[u8]) -> B
    {
      for _ in 0..n - 1 {
        init = func(init, self.read_until(delim));
      }
      func(init, self.read_until(LF))
    }
  } // impl<R> Scanner<R>

} // mod my


Measured memory_bytes: 2180