#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N (1000000000+7) //#define N 998244353 #define INF 1e16 typedef long long ll; typedef pair P; typedef pair Q; const int inf = (int)1e9; int main(void){ int n,m; ll k; cin>>n>>m>>k; char op; vectora(n),b(m); ll sum = 0; cin>>op; for(int i=0;i>b[i]; } sort(b.begin(),b.end()); if(op=='+'){ ll ans = 0; for(int i=0;i>a[i]; auto itr = lower_bound(b.begin(),b.end(),k-a[i]); ll index = itr-b.begin(); ans+=n-index+1; } cout<>a[i]; ll x= k/a[i]+((k%a[i]==0)?0LL:1LL); auto itr = lower_bound(b.begin(),b.end(),x); ll index = itr-b.begin(); ans+=n-index+1; } cout<