use std::collections::{HashMap, HashSet};

fn main() {
    proconio::input! {
        n: u64,
        m:u64,
        k:u64,
        op: String,
        mut b: [u64;m],
        mut a: [u64;n],
    }
    let op = match op.as_str() {
        "+" => |x: u64, y: u64| x + y,
        "*" => |x: u64, y: u64| x * y,
        _ => unreachable!(),
    };
    b.sort_unstable();
    a.sort_unstable();
    let ans = a
        .into_iter()
        .map(|a| m - b.partition_point(|&b| op(a, b) < k) as u64)
        .sum::<u64>();
    println!("{}", ans);
}