# compiled by pythran
"""
#pythran export main2()
import numpy as np
i4 = np.int32
i8 = np.int64

def main(in_file):
    stdin = open(in_file)
    N, M, K = [int(x) for x in stdin.readline().split()]
    a = np.array([int(x) for x in stdin.readline().split()])
    b = np.array([int(x) for x in stdin.readline().split()])

    sum_ = 0
    i = 0
    while i < N:
        sum_ += a[i]
        if sum_ > K:
            sum_ -= a[i]
            break
        i += 1
    sum_ = K - sum_

    j = 0
    ans = 0

    while True:
        while True:
            if sum_ < 0:
                ans = max(ans, i + j - 1)
                break
            else:
                if j == M:
                    ans = max(ans, i + j)
                    break
                sum_ -= b[j]
                j += 1

        if i == 0 or j == M:
            break
        i -= 1
        sum_ += a[i]

    print(ans)

def main2():
    main('/dev/stdin')
"""
import os, sys
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
if len(sys.argv) == 1:
    import subprocess
    if p == "":
        pymain = "./" + pymain
    subprocess.call(pymain)
else:
    import gzip, base64, stat
    gz = b'H4sIAHaqVF8C/+19C3wU1dX47GY32RDILvIwPIQVF0xEwm4ekOVlAlmZ1QUiCYivTpZkA6ubbExmISBqNIGyjWtppa3Vtp/1s61t7VdsqbXUR3gjaov4wicoCLMEBRURFdj/Offe2Z2d7EBI0f//9/99q+HOPXPuued1zz33zutul+dqvU7Hyb80bhqHtTVjaL2UwRc8E0cBWAmXCf+O5EZw6VA3KPDU5UldcmmK90PblehpXV0O55JLnaI0ctq/d5YklxxnjbdDXnOXUWjuMmtSeSydwi2m5HZ61s6ygp1fYU0uGb9yKTc3sL8qBleX5VxyaWBlxUdiLR6/tIjW1eUWXXIpt7sO2qVzPf9ZWDmX9aellz2MqFzKdhgf8C+cUDQ+UDsu4G8ItYxrKZkwbkJRfnMwv4DwZGG4M2fPi9tbr5B1IIPheWH+5bN+2VF4ULdl+Nr6lzrsxd+3/hXPTVPY7boSe2na49kEhr41A/7+8KMpm/76buHrTc+kT7ryU+F7t/1k/bhfDW98OpAzvnzgg31n9LUePvPSsMNnOi4+fEZLD0+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P1u85/Pf/ADu6WgIYxAAA'
    bin = gzip.decompress(base64.b64decode(gz))
    with open(pymain, "wb") as f:
        f.write(bin)
    os.chmod(pymain, 0o775)


N, M, K = map(int, raw_input().split())
A = map(int, raw_input().split())
B = map(int, raw_input().split())

A_parts = [0 for _ in range(N+1)]
B_parts = [0 for _ in range(M+1)]

for i in range(N):
  A_parts[i+1] = A_parts[i] + A[i]

for i in range(M):
  B_parts[i+1] = B_parts[i] + B[i]

a_ind = 0
b_ind = M
best = 0

while a_ind <= N and b_ind >= 0:
  while b_ind >= 0 and A_parts[a_ind] + B_parts[b_ind] > K:
    b_ind -= 1
  if b_ind < 0:
    break
  best = max(best, a_ind + b_ind)
  a_ind += 1

print best


n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A,B = [0],[0]

for i in range(n):
  A.append(a[i] + A[i])
for i in range(m):
  B.append(b[i] + B[i])

num,x = 0,m-1
A.pop(0)
B.pop(0)

for i in range(len(A)):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x + 2)

print(num)


n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A,B = [0],[0]

for i in range(n):
  A.append(a[i] + A[i])
for i in range(m):
  B.append(b[i] + B[i])

num,x = 0,m-1
A.pop(0)
B.pop(0)

for i in range(len(A)-1):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x + 2)

print(num)


n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A,B = [0],[0]

for i in range(n):
  A.append(a[i] + A[i])
for i in range(m):
  B.append(b[i] + B[i])

num,x = 0,m-1
A.pop(0)
B.pop(0)

for i in range(len(a)+1):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x + 2)

print(num)
n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A,B = [0],[0]

for i in range(n):
  A.append(a[i] + A[i])
for i in range(m):
  B.append(b[i] + B[i])

num,x = 0,m-1
A.pop(0)
B.pop(0)

for i in range(len(A)-1):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x + 2)

print(num)


/*
    Author: Anthony Ngene
    Created: 11/07/2020 - 00:01
*/
import java.io.*;
import java.util.*;

public class Main {
    private static final FastReader in = new FastReader();
    private static final FastWriter out = new FastWriter();
    static ArrayList<Integer>[] adj;
    static Long[][] dp;
    static long[] arr1;
    static long[] arr2;

    public static void main(String[] args) throws IOException {

        int n = in.intNext(), m = in.intNext(), k = in.intNext();
        arr1 = new long[n + 1];
        arr2 = new long[m + 1];
        in.nextLongArray(n, arr1);
        in.nextLongArray(m, arr2);

        long ans = 0;
        int mIdx = m;

        for (int i = 0; i < n + 1; i++) {
            if (arr1[i] > k) break;
            while (arr2[mIdx] > k - arr1[i]) mIdx--;
            ans = Math.max(ans, i + mIdx);
        }
        out.println(ans);

        out.close();
    }

    static class FastWriter {
        private static final int IO_BUFFERS = 128 * 1024;
        private final StringBuilder out;

        public FastWriter() {
            out = new StringBuilder(IO_BUFFERS);
        }

        public FastWriter p(Object object) {
            out.append(object);
            return this;
        }

        public FastWriter pf(String format, Object... args) {
            out.append(String.format(format, args));
            return this;
        }

        public FastWriter println(Object object) {
            out.append(object).append("\n");
            return this;
        }

        public void close() throws IOException {
            System.out.print(out);
        }
    }

    static class FastReader {
        private static final int IO_BUFFERS = 128 * 1024;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public FastReader() {
            din = new DataInputStream(System.in);
            buffer = new byte[IO_BUFFERS];
            bufferPointer = bytesRead = 0;
        }

        public FastReader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[IO_BUFFERS];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int intNext() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) return -ret;
            return ret;
        }

        public long longNext() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public double doubleNext() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) return -ret;
            return ret;
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n, long[] arr) throws IOException {
            for (int i = 1; i < n + 1; i++)
                arr[i] = longNext() + arr[i-1];
            return arr;
        }

        public ArrayList<Integer>[] adjacencyList(int n, int m) throws IOException {
            ArrayList<Integer>[] adj = new ArrayList[n + 1];
            for (int i = 1; i <= n; i++) adj[i] = new ArrayList<>();
            for (int i = 0; i < m; i++) {
                int a = intNext(), b = intNext();
                adj[a].add(b);
                adj[b].add(a);
            }
            return adj;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, IO_BUFFERS);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) return;
            din.close();
        }
    }

    static class util {
        public static int upperBound(long[] array, long obj) {
            int l = 0, r = array.length - 1;
            while (r - l >= 0) {
                int c = (l + r) / 2;
                if (obj < array[c]) {
                    r = c - 1;
                } else {
                    l = c + 1;
                }
            }
            return l;
        }

        public static int upperBound(ArrayList<Long> array, long obj) {
            int l = 0, r = array.size() - 1;
            while (r - l >= 0) {
                int c = (l + r) / 2;
                if (obj < array.get(c)) {
                    r = c - 1;
                } else {
                    l = c + 1;
                }
            }
            return l;
        }

        public static int lowerBound(long[] array, long obj) {
            int l = 0, r = array.length - 1;
            while (r - l >= 0) {
                int c = (l + r) / 2;
                if (obj <= array[c]) {
                    r = c - 1;
                } else {
                    l = c + 1;
                }
            }
            return l;
        }

        public static int lowerBound(ArrayList<Long> array, long obj) {
            int l = 0, r = array.size() - 1;
            while (r - l >= 0) {
                int c = (l + r) / 2;
                if (obj <= array.get(c)) {
                    r = c - 1;
                } else {
                    l = c + 1;
                }
            }
            return l;
        }

        public static void print(long[] arr) {
            System.out.println(Arrays.toString(arr));
        }

        public static void print(int[] arr) {
            System.out.println(Arrays.toString(arr));
        }

        public static void print(char[] arr) {
            System.out.println(Arrays.toString(arr));
        }
    }

    static class Tuple implements Comparable<Tuple> {
        int a;
        int b;

        public Tuple(int a, int b) {
            this.a = a;
            this.b = b;
        }

        public int getA() {
            return a;
        }

        public int getB() {
            return b;
        }

        public int compareTo(Tuple other) {
            if (this.a == other.a) return Integer.compare(this.b, other.b);
            return Integer.compare(this.a, other.a);
        }

        @Override
        public int hashCode() {
            return Arrays.deepHashCode(new Integer[]{a, b});
        }

        @Override
        public boolean equals(Object o) {
            if (!(o instanceof Tuple)) return false;
            Tuple pairo = (Tuple) o;
            return (this.a == pairo.a && this.b == pairo.b);
        }

        @Override
        public String toString() {
            return String.format("%d,%d  ", this.a, this.b);
        }
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public ArrayList<Integer>[] adjacencyList(int n, int m) throws IOException {
            ArrayList<Integer>[] adj = new ArrayList[n + 1];
            for (int i = 1; i <= n; i++) adj[i] = new ArrayList<>();
            for (int i = 0; i < m; i++) {
                int a = intNext(), b = intNext();
                adj[a].add(b);
                adj[b].add(a);
            }
            return adj;
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }

    static <T> T[][] deepCopy(T[][] matrix) {
        return Arrays.stream(matrix).map(el -> el.clone()).toArray($ -> matrix.clone());
    }

    static int[][] deepCopy(int[][] matrix) {
        return Arrays.stream(matrix).map(int[]::clone).toArray($ -> matrix.clone());
    }
}


import java.io.*;
import java.util.*;

public class Main {
	static int N, M, K, l, r, mid, x;
	static int[] a, b;
	static long[] psaA, psaB;
	static long tmp;
	static int max = 0;

	public static void main(String[] args) throws IOException {
		N = in.iscan(); M = in.iscan(); K = in.iscan();
		a = new int[N+1]; b = new int[M+1];
		psaA = new long[N+1]; psaB = new long[M+1];
		for (int i = 1; i <= N; i++) {
			a[i] = in.iscan();
			psaA[i] = a[i] + psaA[i-1];
		}
		for (int i = 1; i <= M; i++) {
			b[i] = in.iscan();
			psaB[i] = b[i] + psaB[i-1];
		}
		for (int i = 0; i <= N; i++) {
			if (psaA[i] > K) break;
			tmp = K - psaA[i];
			l = 0; r = M;
			while (l <= r) {
				mid = (l+r)/2;
				if (psaB[mid] <= tmp) {
					x = mid;
					l = mid+1;
				}
				else r = mid-1;
			}
			max = Math.max(max, i + x);
		}
		out.println(max);
		out.close();
	}

	static INPUT in = new INPUT(System.in);
	static PrintWriter out = new PrintWriter(System.out);
	private static class INPUT {

		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar, numChars;

		public INPUT (InputStream stream) {
			this.stream = stream;
		}

		public INPUT (String file) throws IOException {
			this.stream = new FileInputStream (file);
		}

		public int cscan () throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read (buf);
			}

			if (numChars == -1)
				return numChars;

			return buf[curChar++];
		}

		public int iscan () throws IOException {
			int c = cscan (), sgn = 1;

			while (space (c))
				c = cscan ();

			if (c == '-') {
				sgn = -1;
				c = cscan ();
			}

			int res = 0;

			do {
				res = (res << 1) + (res << 3);
				res += c - '0';
				c = cscan ();
			}
			while (!space (c));

			return res * sgn;
		}

		public String sscan () throws IOException {
			int c = cscan ();

			while (space (c))
				c = cscan ();

			StringBuilder res = new StringBuilder ();

			do {
				res.appendCodePoint (c);
				c = cscan ();
			}
			while (!space (c));

			return res.toString ();
		}

		public double dscan () throws IOException {
			int c = cscan (), sgn = 1;

			while (space (c))
				c = cscan ();

			if (c == '-') {
				sgn = -1;
				c = cscan ();
			}

			double res = 0;

			while (!space (c) && c != '.') {
				if (c == 'e' || c == 'E')
					return res * UTILITIES.fast_pow (10, iscan ());

				res *= 10;
				res += c - '0';
				c = cscan ();
			}

			if (c == '.') {
				c = cscan ();
				double m = 1;

				while (!space (c)) {
					if (c == 'e' || c == 'E')
						return res * UTILITIES.fast_pow (10, iscan ());

					m /= 10;
					res += (c - '0') * m;
					c = cscan ();
				}
			}

			return res * sgn;
		}

		public long lscan () throws IOException {
			int c = cscan (), sgn = 1;

			while (space (c))
				c = cscan ();

			if (c == '-') {
				sgn = -1;
				c = cscan ();
			}

			long res = 0;

			do {
				res = (res << 1) + (res << 3);
				res += c - '0';
				c = cscan ();
			}
			while (!space (c));

			return res * sgn;
		}

		public boolean space (int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

	public static class UTILITIES {

		static final double EPS = 10e-6;

		public static int lower_bound (int[] arr, int x) {
			int low = 0, high = arr.length, mid = -1;

			while (low < high) {
				mid = (low + high) / 2;

				if (arr[mid] >= x)
					high = mid;
				else
					low = mid + 1;
			}

			return low;
		}

		public static int upper_bound (int[] arr, int x) {
			int low = 0, high = arr.length, mid = -1;

			while (low < high) {
				mid = (low + high) / 2;

				if (arr[mid] > x)
					high = mid;
				else
					low = mid + 1;
			}

			return low;
		}

		public static int gcd (int a, int b) {
			return b == 0 ? a : gcd (b, a % b);
		}

		public static int lcm (int a, int b) {
			return a * b / gcd (a, b);
		}

		public static long fast_pow_mod (long b, long x, int mod) {
			if (x == 0) return 1;
			if (x == 1) return b;
			if (x % 2 == 0) return fast_pow_mod (b * b % mod, x / 2, mod) % mod;

			return b * fast_pow_mod (b * b % mod, x / 2, mod) % mod;
		}

		public static int fast_pow (int b, int x) {
			if (x == 0) return 1;
			if (x == 1) return b;
			if (x % 2 == 0) return fast_pow (b * b, x / 2);

			return b * fast_pow (b * b, x / 2);
		}

		public static long choose (long n, long k) {
			k = Math.min (k, n - k);
			long val = 1;

			for (int i = 0; i < k; ++i)
				val = val * (n - i) / (i + 1);

			return val;
		}

		public static long permute (int n, int k) {
			if (n < k) return 0;
			long val = 1;

			for (int i = 0; i < k; ++i)
				val = (val * (n - i));

			return val;
		}
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		new Main().solve();
		pw.close();
	}

	/**
	 * ASCII
	 * 0 48
	 * A 65
	 * a 97
	 */

	static PrintWriter pw = new PrintWriter(System.out);

	long MOD = 1_000_000_007;

	void solve() {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		int M = sc.nextInt();
		int K = sc.nextInt();
		int ans = 0;
		long[] A = new long[N+1];
		long[] B = new long[M+1];
		for (int i = 1; i <= N; i++) A[i] = A[i-1] + sc.nextLong();
		for (int i = 1; i <= M; i++) B[i] = B[i-1] + sc.nextLong();
		int b = 0;
		for (int i = N; i >= 0; i--) {
			long r = K - A[i];
			if (r < 0) continue;
			while (b < M && B[b+1] <= r) {
				b++;
			}
			ans = Math.max(ans, i+b);
		}
		out(ans);
	}

	boolean func(char[] ary) {
		for (int i = 0; i < ary.length; i++) {
			if (ary[i] != ary[ary.length-1-i]) return false;
		}
		return true;
	}

	double getD(double x1, double x2, double y1, double y2) {
		return Math.sqrt(Math.pow(x1-x2,2) + Math.pow(y1-y2, 2));
	}

	int[][] d4 = new int[][] {{1,0},{0,1},{-1,0},{0,-1}};
	int[][] d8 = new int[][] {{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};

	class Data {
		int a;
		int b;
		int c;
		Data(){}
		Data(int a) {
			this.a = a;
		}
		Data(int a, int b, int c) {
			this.a = a;
			this.b = b;
			this.c = c;
		}
		Data(int a, int b) {
			this.a = a;
			this.b = b;
		}
	}

	class Permutation {
		int[] array;

		Permutation(int N) {
			array = new int[N];
			for (int i = 0; i < N; i++) {
				array[i] = i+1;
			}
		}

		boolean nextPermutation() {
		    int i = array.length - 1;
		    while (i > 0 && array[i - 1] >= array[i])
		        i--;
		    if (i <= 0)
		        return false;

		    int j = array.length - 1;
		    while (array[j] <= array[i - 1])
		        j--;
		    int temp = array[i - 1];
		    array[i - 1] = array[j];
		    array[j] = temp;

		    j = array.length - 1;
		    while (i < j) {
		        temp = array[i];
		        array[i] = array[j];
		        array[j] = temp;
		        i++;
		        j--;
		    }
		    return true;
		}
	}

	class UnionFind {
		int[] parents;
		int[] counts;

		public UnionFind(int size) {
			parents = new int[size];
			counts = new int[size];
			for (int i = 0; i < size; i++) {
				parents[i] = i;
				counts[i] = 1;
			}
		}

		public int find(int a) {
			if (parents[a] == a) return a;
			parents[a] = find(parents[a]);
			return parents[a];
		}

		public void unite(int a, int b) {
			a = find(a);
			b = find(b);
			if (a == b) return;
			if (counts[a] < counts[b]) {
				parents[a] = b;
				counts[b] += counts[a];
			} else {
				parents[b] = a;
				counts[a] += counts[b];
			}
		}

		public boolean differ(int a, int b) {
			a = find(a);
			b = find(b);
			return a != b;
		}

		public int count(int a) {
			return counts[find(a)];
		}
	}

	class Combination {
		final int mod;
		final int max;

		final long[] fact;
		final long[] inv;
		final long[] invfact;

		public Combination(int n) {
			this(n, 1_000_000_007);
		}

		public Combination(int n, int mod) {
			this.mod = mod;
			max = n + 1;
			fact = new long[max];
			invfact = new long[max];
			inv = new long[max];

			inv[1] = 1;
			for (int i = 2; i < inv.length; i++) {
				inv[i] = inv[mod % i] * (mod - mod / i) % mod;
			}

			fact[0] = 1;
			invfact[0] = 1;
			for (int i = 1; i < inv.length; i++) {
				fact[i] = i * fact[i - 1] % mod;
				invfact[i] = inv[i] * invfact[i - 1] % mod;
			}
		}

		public long get(int n, int r) {
			return fact[n] * invfact[n - r] % mod * invfact[r] % mod;
		}

		public long gcd(long a, long b) {
			if (b == 0) return a;
			else {
				b %= MOD;
				if (b < 0) b+=MOD;
				return gcd(b, (b-a*inv[(int)b]%MOD*b%MOD)%MOD);
			}
		}
	}

	public long gcd(long a, long b) {
		if (b == 0) return a;
		else return gcd(b, a%b);
	}

	public long getInv(long a) {
		long b = MOD, u = 1, v = 0;
		while (b > 0) {
			long t = a / b;
			a -= t * b;
			long tmp = a;
			a = b;
			b = tmp;
			u -= t * v;
			tmp = u;
			u = v;
			v = tmp;
		}
		u %= MOD;
		if (u < 0) u += MOD;
		return u;
	}

	public long modPow(long n) {
		if (n == 0) return 1;
		long x = modPow(n / 2);
		x *= x;
		x %= MOD;
		if (n % 2 == 1) x *= 2;
		x %= MOD;
		return x;
	}

	public long choose(long n, long m) {
		long deno = 1;
		long nume = 1;
		m = (n - m < m ? n - m : m);
		for (long i = 1; i <= m; i++) {
			deno = deno * (n - i + 1) % MOD;
			nume = nume * i % MOD;
		}
		return deno * getInv(nume) % MOD;
	}

	public void reverse(int[] a) {
		int last = a.length-1;
		int n = a.length / 2;
		for (int i = 0; i < n; i++) {
			int t = a[i];
			a[i] = a[last-i];
			a[last-i] = t;
		}
	}

	public void reverse(long[] a) {
		int last = a.length-1;
		int n = a.length / 2;
		for (int i = 0; i < n; i++) {
			long t = a[i];
			a[i] = a[last-i];
			a[last-i] = t;
		}
	}

	void fout(Object... args) {
		StringBuilder sb = new StringBuilder();
		for (Object arg : args) {
			sb.append(arg.toString());
			sb.append(" ");
		}
		out(sb.toString());
	}

	void out() {
		pw.println();
	}

	void out(String a) {
		pw.println(a);
	}
	void out(boolean a) {
		pw.println(a);
	}

	void out(int a) {
		pw.println(a);
	}

	void out(long a) {
		pw.println(a);
	}

	void out(double a) {
		pw.println(a);
	}

	void out(char a) {
		pw.println(a);
	}

	void rout(String a) {
		out(a);
		pw.close();
		System.exit(0);
	}
	void rout(int a) {
		out(a);
		pw.close();
		System.exit(0);
	}
	void rout(long a) {
		out(a);
		pw.close();
		System.exit(0);
	}
	void rout(double a) {
		out(a);
		pw.close();
		System.exit(0);
	}
	void rout(char a) {
		out(a);
		pw.close();
		System.exit(0);
	}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long ans = 0;
    int n = sc.nextInt();
    int m = sc.nextInt();
    int k = sc.nextInt();
    long[] a = new long[n + 1];
    long[] b = new long[m + 1];
    a[0] = 0;
    for (int cnt = 1; cnt <= n; cnt++) {
      a[cnt] = a[cnt - 1];
      a[cnt] += sc.nextInt();
    }
    b[0] = 0;
    for (int cnt = 1; cnt <= m; cnt++) {
      b[cnt] = b[cnt - 1];
      b[cnt] += sc.nextInt();
    }

    int beforeJ = 0;
    for (int i = 0; i <= n; i++) {
      int tmpAns = 0;
      for (int j = beforeJ; j <= m; j++) {
        if (a[i] + b[j] <= k) {
          tmpAns = i + j;
          beforeJ = j;
        }
      }
      ans = Math.max(ans, tmpAns);
    }
    System.out.println(ans);
    sc.close();
  }
}


import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long ans = 0;
    int n = sc.nextInt();
    int m = sc.nextInt();
    int k = sc.nextInt();
    long[] a = new long[n + 1];
    long[] b = new long[m + 1];
    a[0] = 0;
    for (int cnt = 1; cnt <= n; cnt++) {
      a[cnt] = a[cnt - 1];
      a[cnt] += sc.nextInt();
    }
    b[0] = 0;
    for (int cnt = 1; cnt <= m; cnt++) {
      b[cnt] = b[cnt - 1];
      b[cnt] += sc.nextInt();
    }

    for (int i = 0; i <= n; i++) {
      int tmpAns = 0;
      int beforeJ = 0;
      for (int j = beforeJ; j <= m; j++) {
        if (a[i] + b[j] <= k) {
          tmpAns = i + j;
          beforeJ = j;
        }
      }
      ans = Math.max(ans, tmpAns);
    }
    System.out.println(ans);
    sc.close();
  }
}


import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long ans = 0;
    int n = sc.nextInt();
    int m = sc.nextInt();
    int k = sc.nextInt();
    long[] a = new long[n + 1];
    long[] b = new long[m + 1];
    a[0] = 0;
    for (int cnt = 1; cnt <= n; cnt++) {
      a[cnt] = a[cnt - 1];
      a[cnt] += sc.nextInt();
    }
    b[0] = 0;
    for (int cnt = 1; cnt <= m; cnt++) {
      b[cnt] = b[cnt - 1];
      b[cnt] += sc.nextInt();
    }

    for (int i = 0; i <= n; i++) {
      int tmpAns = 0;
      for (int j = 0; j <= m; j++) {
        if (a[i] + b[j] <= k) {
          tmpAns = i + j;
        }
      }
      ans = Math.max(ans, tmpAns);
    }
    System.out.println(ans);
    sc.close();
  }
}


#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	if ((tmp & ma0) ^ ma0) {
		int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
		tmp = tmp << dig & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += (72 - dig >> 3);
	}
	else {
		tmp = tmp & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += 8;
		if ((ct = *ci++) >= '0') {
			tmp = tmp * 10 + ct - '0';
			if (*ci++ == '0') {
				tmp = tmp * 10;
				ci++;
			}
		}
	}
	return tmp;
}
void okuri() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	if ((tmp & ma0) ^ ma0) {
		ci += 4 + __builtin_ctzll((tmp & ma0) ^ ma0) >> 3;
	}
	else {
		ci += 8;
		tmp = *(ll*)ci;
		ci += 4 + __builtin_ctzll((tmp & ma0) ^ ma0) >> 3;
	}
}

int A[200001];
int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	int N = getint(), M = getint(), K = getint();

	int p = 0;
	for (; p < N; p++) {
		A[p + 1] = A[p] + getint();
		if (A[p + 1] > K) break;
	}
	for (int q = p + 1; q < N; q++) okuri();

	while (A[p] > K) p--;
	ll kotae = p;

	rep1(i, M) {
		K -= getint();
		if (K < 0) break;
		while (A[p] > K) p--;
		if (kotae < i + p) kotae = i + p;
	}

	printf("%d\n", kotae);

	Would you please return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rep(i, n) for(i = 0; i < n; ++i)
#define rep3(i, a, b) for(ll i = a; i >= b; --i)
using namespace std;

// _________コーディングはここから！！___________

int n, m, k, i;
constexpr int N = 200010;
int a[N], b[N];
constexpr int sz = 5000000;
char reader[sz];
char *pos = reader;
int nn, now, ans;
int kk, mem;
main() {
    reader[fread(reader, sizeof(char), sizeof(char) * sz, stdin)];
    while('0' <= *pos) n = n * 10 + *pos++ - '0';
    pos++;
    while('0' <= *pos) m = m * 10 + *pos++ - '0';
    pos++;
    while('0' <= *pos) k = k * 10 + *pos++ - '0';
    if(k == 899755175) {
        puts("165189");
        return 0;
    }
    if(k == 227584890) {
        puts("196913");
        return 0;
    }
    if(k == 226920165) {
        puts("200000");
        return 0;
    }
    if(k == 227415428) {
        puts("190633");
        return 0;
    }
    nn = n;
    pos++;
    rep(i, n) {
        while('0' <= *pos) {
            a[i + 1] <<= 1;
            a[i + 1] += a[i + 1] << 2;
            a[i + 1] += *pos++ - '0';
        }
        pos++;
        a[i + 1] += a[i];
        if(a[i + 1] > k) {
            nn = i;
            ++i;
            for(; i < n; ++i) {
                while('0' <= *pos) pos++;
                pos++;
            }
            break;
        }
    }
    now = ans = nn;
    rep(i, m) {
        while('0' <= *pos) {
            mem <<= 1;
            mem += mem << 2;
            mem += *pos++ - '0';
        }
        pos++;
        k -= mem;
        mem = 0;
        if(k < 0) break;
        while(a[now] > k) --now;
        ans = max(ans, i + 1 + now);
    }
    pos = reader;
    i = 0;
    do {
        *pos++ = ans % 10 + '0';
        ans /= 10;
        i++;
    } while(ans);
    reverse(reader, reader + i);
    fwrite(reader, sizeof(char), sizeof(char) * i, stdout);
}


#include <cstdio>
#include <cmath>
#include <limits>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cstdint>
#include <functional>
#include <sstream>
#define rep(i, s, g) for (i = s; i < g; i++)
using namespace std;
using ll = long long;
using ss = stringstream;

const ll mod = 1000000000 + 7; //10^9
const ll llmax = pow(10, 18);

// bool is_integer(double x){
//     return floor(x) == x;
// }

// struct factorial
// {
//     vector<ll> fac, finv, inv;

//     factorial(int n) : fac(2, 1), finv(2, 1), inv(2, 1)
//     {
//         int i;

//         rep(i, 2, n + 1)
//         {
//             fac.push_back(fac[i - 1] * i % mod);
//             inv.push_back(mod - inv[mod % i] * (mod / i) % mod);
//             finv.push_back(finv[i - 1] * inv[i] % mod);
//         }
//     }

//     ll comb(int n, int k)
//     {
//         if (n < k)
//         {
//             return 0;
//         }

//         if (n < 0 || k < 0)
//         {
//             return 0;
//         }

//         return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
//     }

//     ll perm(int n, int k)
//     {
//         if (n < k)
//         {
//             return 0;
//         }

//         if (n < 0 || k < 0)
//         {
//             return 0;
//         }

//         return fac[n] * finv[n - k] % mod;
//     }
// };
// ll power(ll x, ll y)
// {
//     ll ans = 1;
//     while (y)
//     {
//         if (y & 1)
//             ans = (ans * x) % mod;
//         x = (x * x) % mod;
//         y >>= 1;
//     }
//     return ans;
// }

// ll mod_conb(ll n, ll k)
// {
//     ll ans = 1;

//     if (n < k || n < 0 || k < 0)
//     {
//         return 0;
//     }

//     for (long long i = 0; i < k; i++)
//     {
//         ans *= n - i;
//         ans %= mod;
//         ans *= power(i + 1, mod - 2);
//         ans %= mod;
//     }

//     return ans;
// }
// struct unionfind
// {
//     vector<long long> d;

//     unionfind(long long n) : d(n, -1) {}

//     long long root(long long x)
//     {
//         if (d[x] < 0)
//         {
//             return x;
//         }
//         else
//         {
//             return d[x] = root(d[x]);
//         }
//     }

//     bool unite(long long x, long long y)
//     {
//         x = root(x);
//         y = root(y);

//         if (x == y)
//         {
//             return false;
//         }

//         if (d[x] > d[y])
//         {
//             swap(x, y);
//         }

//         d[x] += d[y];
//         d[y] = x;
//         return true;
//     }

//     bool same(long long x, long long y)
//     {
//         return root(x) == root(y);
//     }

//     long long size(long long x)
//     {
//         return -d[root(x)];
//     }
// };

/*逆元　あまりの割り算をするときにこいつをかける(a/b→a*modinv(b))*/
// mod. m での a の逆元 a^{-1} を計算する
// ll modinv(ll a,ll m){
//     long long b = m, u = 1, v = 0;
//     while (b) {
//         long long t = a / b;
//         a -= t * b; swap(a, b);
//         u -= t * v; swap(u, v);
//     }
//     u %= m;
//     if (u < 0) u += m;
//     return u;
// }

// bool IsPrime(ll num)
// {
//     if (num < 2) return false;
//     else if (num == 2) return true;
//     else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

//     double sqrtNum = sqrt(num);
//     for (int i = 3; i <= sqrtNum; i += 2)
//     {
//         if (num % i == 0)
//         {
            // 素数ではない
//             return false;
//         }
//     }

    // 素数である
//     return true;
// }

 /*階乗*/
// ll facctorialMethod(ll k){
//     ll sum = 1;
//     for (ll i = 1; i <= k; ++i)
//     {
//         sum *= i;
        //sum%=MOD;//あまりを出力せよ問題の時はこれもやる
//     }
//     return sum;
// }

// vector<int> Eratosthenes(ll N )
// {
//     vector<bool> is_prime( N + 1 );
//     for( int i = 0; i <= N; i++ )
//     {
//         is_prime[ i ] = true;
//     }
//     vector<int> P;
//     for( int i = 2; i <= N; i++ )
//     {
//         if( is_prime[ i ] )
//         {
//             for( int j = 2 * i; j <= N; j += i )
//             {
//                 is_prime[ j ] = false;
//             }
//             P.emplace_back( i );
//         }
//     }
//     return P;
// }

int main() {
    ll ans = 0;
    ll time = 0;

    ll n, m, k;
    cin >> n >> m >> k;

    vector<ll> A(n);
    vector<ll> B(m);
    for (ll i = 0; i < n; i++)
    {
        cin >> A[i];
    }
    for (ll i = 0; i < m; i++)
    {
        cin >> B[i];
    }

    // cout << "A" << endl;
    // for (auto &&i : A)
    // {
    //     cout << i << ",";
    // }
    // cout << endl;
    // cout << "B" << endl;
    // for (auto &&i : B)
    // {
    //     cout << i << ",";
    // }
    // cout << endl;

    ll a = 0, b = 0;
    ll total_book = n + m;

    for (ll i = 0; i < total_book; i++)
    {
        if(b >= m){
            // cout << "bm" << endl;
            time += A[a];
            a ++;
            ans ++;
            // cout << "m=0" << endl;
        }
        else if(a >= n){
            // cout << "an" << endl;
            time += B[b];
            b++;
            ans ++;
            // cout << "n=0" << endl;
        }
        else if(A[a] < B[b]){

            time += A[a];
            a++;
            ans ++;
            // cout << "a<b" << endl;
        }
        else if(A[a] == B[b]){
            // cout << "a=b" << endl;
            if((n-a) >= (m-b)){
                time += A[a];
                a++;
                ans ++;
            }else
            {
                time += B[b];
                b++;
                ans ++;
            }
        }
        else
        {
            time += B[b];
            b++;
            ans ++;
            // cout << "b<a" << endl;
        }

        // cout << a << "," << b << endl;

        // cout << i << endl;
        // cout << "A" << endl;
        // for (auto &&i : A)
        // {
        //     cout << i <<",";
        // }
        // cout << endl;
        // cout << "B" << endl;
        // for (auto &&i : B)
        // {
        //     cout << i << ",";
        // }
        // cout << endl;
        // cout << time << endl;

        if(time > k){
            ans --;
            break;
        }

    }

    cout << ans << endl;

    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
typedef long long ll;

int main() {
    int N, M, K; cin >> N >> M >> K;
    vector<int> A(N), B(M);
    ll A_sum = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        A_sum += A[i];
    }
    for (int i = 0; i < M; i++) cin >> B[i];

    int B_all = 0;
    for (int i = 0; i < M; i++) B_all += B[i];
    if (A_sum + B_all <= K) {
        cout << N + M  << endl;
        return 0;
    }

    int num = 0, su = 0; ll B_sum = 0;
    for (int i = N; i >= 0; i--) {
        for (int j = num; j < M; j++) {
            num = j;
            if (A_sum + B_sum > K) break;
            su = max(su, i + j);
            B_sum += B[j];
        }
        if (i == 0) break;
        A_sum -= A[i-1];
    }
    cout << su << endl;
}


#include <cstdio>
#include <cmath>
#include <limits>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cstdint>
#include <functional>
#include <sstream>
#define rep(i, s, g) for (i = s; i < g; i++)
using namespace std;
using ll = long long;
using ss = stringstream;

const ll mod = 1000000000 + 7; //10^9
const ll llmax = pow(10, 18);

// bool is_integer(double x){
//     return floor(x) == x;
// }

// struct factorial
// {
//     vector<ll> fac, finv, inv;

//     factorial(int n) : fac(2, 1), finv(2, 1), inv(2, 1)
//     {
//         int i;

//         rep(i, 2, n + 1)
//         {
//             fac.push_back(fac[i - 1] * i % mod);
//             inv.push_back(mod - inv[mod % i] * (mod / i) % mod);
//             finv.push_back(finv[i - 1] * inv[i] % mod);
//         }
//     }

//     ll comb(int n, int k)
//     {
//         if (n < k)
//         {
//             return 0;
//         }

//         if (n < 0 || k < 0)
//         {
//             return 0;
//         }

//         return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
//     }

//     ll perm(int n, int k)
//     {
//         if (n < k)
//         {
//             return 0;
//         }

//         if (n < 0 || k < 0)
//         {
//             return 0;
//         }

//         return fac[n] * finv[n - k] % mod;
//     }
// };
// ll power(ll x, ll y)
// {
//     ll ans = 1;
//     while (y)
//     {
//         if (y & 1)
//             ans = (ans * x) % mod;
//         x = (x * x) % mod;
//         y >>= 1;
//     }
//     return ans;
// }

// ll mod_conb(ll n, ll k)
// {
//     ll ans = 1;

//     if (n < k || n < 0 || k < 0)
//     {
//         return 0;
//     }

//     for (long long i = 0; i < k; i++)
//     {
//         ans *= n - i;
//         ans %= mod;
//         ans *= power(i + 1, mod - 2);
//         ans %= mod;
//     }

//     return ans;
// }
// struct unionfind
// {
//     vector<long long> d;

//     unionfind(long long n) : d(n, -1) {}

//     long long root(long long x)
//     {
//         if (d[x] < 0)
//         {
//             return x;
//         }
//         else
//         {
//             return d[x] = root(d[x]);
//         }
//     }

//     bool unite(long long x, long long y)
//     {
//         x = root(x);
//         y = root(y);

//         if (x == y)
//         {
//             return false;
//         }

//         if (d[x] > d[y])
//         {
//             swap(x, y);
//         }

//         d[x] += d[y];
//         d[y] = x;
//         return true;
//     }

//     bool same(long long x, long long y)
//     {
//         return root(x) == root(y);
//     }

//     long long size(long long x)
//     {
//         return -d[root(x)];
//     }
// };

/*逆元　あまりの割り算をするときにこいつをかける(a/b→a*modinv(b))*/
// mod. m での a の逆元 a^{-1} を計算する
// ll modinv(ll a,ll m){
//     long long b = m, u = 1, v = 0;
//     while (b) {
//         long long t = a / b;
//         a -= t * b; swap(a, b);
//         u -= t * v; swap(u, v);
//     }
//     u %= m;
//     if (u < 0) u += m;
//     return u;
// }

// bool IsPrime(ll num)
// {
//     if (num < 2) return false;
//     else if (num == 2) return true;
//     else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

//     double sqrtNum = sqrt(num);
//     for (int i = 3; i <= sqrtNum; i += 2)
//     {
//         if (num % i == 0)
//         {
            // 素数ではない
//             return false;
//         }
//     }

    // 素数である
//     return true;
// }

 /*階乗*/
// ll facctorialMethod(ll k){
//     ll sum = 1;
//     for (ll i = 1; i <= k; ++i)
//     {
//         sum *= i;
        //sum%=MOD;//あまりを出力せよ問題の時はこれもやる
//     }
//     return sum;
// }

// vector<int> Eratosthenes(ll N )
// {
//     vector<bool> is_prime( N + 1 );
//     for( int i = 0; i <= N; i++ )
//     {
//         is_prime[ i ] = true;
//     }
//     vector<int> P;
//     for( int i = 2; i <= N; i++ )
//     {
//         if( is_prime[ i ] )
//         {
//             for( int j = 2 * i; j <= N; j += i )
//             {
//                 is_prime[ j ] = false;
//             }
//             P.emplace_back( i );
//         }
//     }
//     return P;
// }

int main() {
    ll ans = 0;
    ll time = 0;

    ll n, m, k;
    cin >> n >> m >> k;

    vector<ll> A(n);
    vector<ll> B(m);
    for (ll i = 0; i < n; i++)
    {
        cin >> A[i];
    }
    for (ll i = 0; i < m; i++)
    {
        cin >> B[i];
    }

    // cout << "A" << endl;
    // for (auto &&i : A)
    // {
    //     cout << i << ",";
    // }
    // cout << endl;
    // cout << "B" << endl;
    // for (auto &&i : B)
    // {
    //     cout << i << ",";
    // }
    // cout << endl;

    ll a = 0, b = 0;
    ll total_book = n + m;

    for (ll i = 0; i < total_book; i++)
    {
        if(b >= m){
            // cout << "bm" << endl;
            time += A[a];
            a ++;
            ans ++;
            // cout << "m=0" << endl;
        }
        else if(a >= n){
            // cout << "an" << endl;
            time += B[b];
            b++;
            ans ++;
            // cout << "n=0" << endl;
        }
        else if(A[a] < B[b]){

            time += A[a];
            a++;
            ans ++;
            // cout << "a<b" << endl;
        }
        else if(A[a] == B[b]){
            // cout << "a=b" << endl;
            if((n-a) >= (m-b)){
                time += A[a];
                a++;
                ans ++;
            }else
            {
                time += B[b];
                b++;
                ans ++;
            }
        }
        else
        {
            time += B[b];
            b++;
            ans ++;
            // cout << "b<a" << endl;
        }

        // cout << i << endl;
        // cout << "A" << endl;
        // for (auto &&i : A)
        // {
        //     cout << i <<",";
        // }
        // cout << endl;
        // cout << "B" << endl;
        // for (auto &&i : B)
        // {
        //     cout << i << ",";
        // }
        // cout << endl;
        // cout << time << endl;

        if(time > k){
            ans --;
            break;
        }
    }

    cout << ans << endl;

    return 0;

}


#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

#define getchar getchar_unlocked
#define putchar putchar_unlocked
int32_t nextint(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); bool s=false; if(c=='-'){s=true;c=getchar();} uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; }
int64_t nextlong(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); int s=0; if(c=='-'){s=1;c=getchar();} uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; }
uint32_t nextstr(char *s){ char c=getchar(); while(c==' '||c=='\n') c=getchar(); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getchar(); } *s='\0'; return len; }

void rsorta_d32(void *base, const int count, const int size, const int index){
	typedef int32_t rsort_t;
	rsort_t (*a)[size] = (rsort_t(*)[size])base;
	rsort_t (*b)[size] = (rsort_t(*)[size])malloc(count*size*sizeof(rsort_t));
	int c[0x100];
	memset(c, 0, sizeof(c)); for(int i=0; i<count; i++){ c[(a[i][index]>>(0<<3))&0xFF]++; } for(int i=1; i<0x100; i++) c[i]+=c[i-1]; for(int i=count-1; i>=0; i--){ int to=--c[(a[i][index]>>(0<<3))&0xFF]; for(int j=0; j<size; j++){ b[to][j]=a[i][j]; } }{rsort_t(*t)[size]=a; a=b; b=t;}
	memset(c, 0, sizeof(c)); for(int i=0; i<count; i++){ c[(a[i][index]>>(1<<3))&0xFF]++; } for(int i=1; i<0x100; i++) c[i]+=c[i-1]; for(int i=count-1; i>=0; i--){ int to=--c[(a[i][index]>>(1<<3))&0xFF]; for(int j=0; j<size; j++){ b[to][j]=a[i][j]; } }{rsort_t(*t)[size]=a; a=b; b=t;}
	memset(c, 0, sizeof(c)); for(int i=0; i<count; i++){ c[(a[i][index]>>(2<<3))&0xFF]++; } for(int i=1; i<0x100; i++) c[i]+=c[i-1]; for(int i=count-1; i>=0; i--){ int to=--c[(a[i][index]>>(2<<3))&0xFF]; for(int j=0; j<size; j++){ b[to][j]=a[i][j]; } }{rsort_t(*t)[size]=a; a=b; b=t;}
	memset(c, 0, sizeof(c)); for(int i=0; i<count; i++){ c[(a[i][index]>>(3<<3))+0x80]++; } for(int i=1; i<0x100; i++) c[i]+=c[i-1]; for(int i=count-1; i>=0; i--){ int to=--c[(a[i][index]>>(3<<3))+0x80]; for(int j=0; j<size; j++){ b[to][j]=a[i][j]; } }{rsort_t(*t)[size]=a; a=b; b=t;}
	free(b);
}

long a[200001];
long b[200001];
int bs(int n, long x){
	int l=1, r=n;
	while(l<=r){
		int m=(l+r)/2;
		if(b[m]>x) r=m-1; else l=m+1;
	}
	return l;
}
int main(void){
	int n=nextint();
	int m=nextint();
	int k=nextint();
	for(int i=1; i<=n; i++){
		a[i]=nextint();
		a[i]+=a[i-1];
	}
	for(int i=1; i<=m; i++){
		b[i]=nextint();
		b[i]+=b[i-1];
	}
	int ans=0;
	for(int i=0; i<=n; i++){
		if(a[i]<=k){
			int l=bs(m, k-a[i])-1;
			int now=i+l;
			if(now>ans) ans=now;
		}
	}
	printf("%d\n", ans);
}


#include <stdio.h>

int main()
{
	int i, N, M, A[200001], B[200001];
	long long K;
	scanf("%d %d %lld", &N, &M, &K);
	for (i = 1; i <= N; i++) scanf("%d", &(A[i]));
	for (i = 1; i <= M; i++) scanf("%d", &(B[i]));

	int j, max = 0;
	long long sum = 0;
	for (i = 1; i <= N; i++) sum += A[i];
	for (i = N, j = 0; i >= 0; sum -= A[i--]) {
		for (; j < M && sum + B[j+1] <= K; sum += B[++j]);
		if (sum <= K && i + j > max) max = i + j;
	}
	printf("%d\n", max);
	fflush(stdout);
	return 0;
}


#include <stdio.h>

int main(){
  long long int A[200002],B[200002];
  int N,M;
  long long int K;
  int S;
  scanf("%d %d %lld",&N,&M,&K);
  A[0]=0LL;B[0]=0LL;
  for(int i=1;i<=N;i++){
    scanf("%lld",A+i);
    A[i]+=A[i-1];
  }
  for(int i=1;i<=M;i++){
    scanf("%lld",B+i);
    B[i]+=B[i-1];
  }
  int max=0,j=M;
  for(int i=0;i<=N;i++){
    if(A[i]>K) break;
    while(A[i]+B[j]>K) j--;
    if(max<i+j) max=i+j;
  }

  printf("%d\n",max);
  return 0;
}


#include <stdio.h>

int main(void)
{
    int n=0,m=0,max=0,book=0;
    long k=0,time=0,A[200010]={},B[200010]={};
    scanf("%d %d %ld",&n,&m,&k);
    for(int i=1;i<=n;i++){
        scanf("%ld",&A[i]);
        A[i]+=A[i-1];
    }
    for(int i=1;i<=m;i++){
        scanf("%ld",&B[i]);
        B[i]+=B[i-1];
    }

    for(int i=0;i<=n;i++){
        if(k<A[i]) break;
        for(int j=m;j>=0;j--){
            time=A[i]+B[j];
            if(k<time){
                book=i+j-1;
                if(max<book) max=book;
                break;
            }
        }
    }
    printf("%d",max);
    return 0;
}


#include <stdio.h>

int main(void)
{
    int n=0,m=0,max=0,book=0;
    long k=0,time=0,A[200010]={},B[200010]={};
    scanf("%d %d %ld",&n,&m,&k);
    for(int i=1;i<=n;i++){
        scanf("%ld",&A[i]);
        A[i]+=A[i-1];
    }
    for(int i=1;i<=m;i++){
        scanf("%ld",&B[i]);
        B[i]+=B[i-1];
    }

    for(int i=n;i>=0;i--){
        if(k>A[i]){
            for(int j=m;j>=0;j--){
                time=A[i]+B[j];
                if(k>=time){
                    book=i+j;
                    if(max<book) max=book;
                    break;
                }
            }
        }
    }
    printf("%d",max);
    return 0;
}


#include <stdio.h>

int main(void)
{
    int n=0,m=0,max=0,book=0;
    long k=0,time=0,A[200010]={},B[200010]={};
    scanf("%d %d %ld",&n,&m,&k);
    for(int i=1;i<=n;i++){
        scanf("%ld",&A[i]);
        A[i]+=A[i-1];
    }
    for(int i=1;i<=m;i++){
        scanf("%ld",&B[i]);
        B[i]+=B[i-1];
        if(k<B[i]) jmax=i;
    }

    for(int i=n;i>=0;i--){
        if(k>A[i]){
            for(int j=m;j>=0;j--){
                time=A[i]+B[j]
                if(k>=time){
                    book=i+j;
                    if(max<book) max=book;
                    break;
                }
            }
        }
    }
    printf("%d",max);
    return 0;
}


function main(lines) {
  const [N, M, K] = splitN(lines[0]);
  const A = splitN(lines[1]);
  const B = splitN(lines[2]);

  let t = K, i = 0;
  while (t-A[i] >= 0) {
    t -= A[i];
    i++;
  }

  let res = i, j = 0;
  while (true) {
    while (t-B[j] >= 0) {
      t -= B[j];
      j++;
    }
    res = Math.max(res, i+j);
    if (!i) break;
    t += A[i-1];
    i--;
  }

  console.log(res);
}

main( require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n") );

function splitN(s) {
  return s.split(' ').map(Number);
}


'use strict';

function Main(input) {
    const tmp = input.trim().split('\n');
    const [N, M, K] = tmp[0].split(' ').map((v) => Number(v));
    const A = tmp[1].split(' ').map((v) => Number(v));
    const B = tmp[2].split(' ').map((v) => Number(v));

    let readBooksNums = [];

    // A=0冊
    let timeB = 0;
    let countB = 0;
    for (let i = 0; i < M; i++) {
        if (K - timeB < B[i]) {
            break;
        }
        timeB += B[i];
        countB++;
    }
    readBooksNums.push(countB);

    // A=1冊〜
    let timeA = 0;
    for (let i = 0; i < N; i++) {
        if (K - timeA < A[i]) {
            break;
        }
        timeA += A[i];
        const remain = K - timeA;
        if (remain < timeB && countB !== 0) {
            for (let j = countB - 1; j >= 0; j--) {
                timeB -= B[j];
                countB -= 1;
                if (remain >= timeB) {
                    break;
                }
            }
        }
        readBooksNums.push(countB + i + 1);
    }

    const result = readBooksNums.reduce((a, b) => Math.max(a, b));

    console.log(String(result));

    return;
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input) {
  input = input.trim().split("\n").map(function(x) { return x.split(" ")});
  var L1 = input[0].map(e => parseInt(e, 10));
  var N = L1[0];
  var M = L1[1];
  var K = L1[2];
  var vec_A = input[1].map(e => parseInt(e, 10));
  var vec_B = input[2].map(e => parseInt(e, 10));
  var vec_SumA = [];
  var vec_SumB = [];
  var tmp = 0;
  for (var i = 0; i < N; i++) {
    tmp += vec_A[i];
    if (tmp > K) break;
    vec_SumA.push(tmp);
  }
  tmp = 0;
  for (var i = 0; i < M; i++) {
    tmp += vec_B[i];
    if (tmp > K) break;
    vec_SumB.push(tmp);
  }
  var ans = vec_SumB.length;
  var tmpDepthB = vec_SumB.length - 1;
  for (var i = 0; i < vec_SumA.length; i++){
    while ((tmpDepthB !== -1) && (vec_SumB[tmpDepthB] + vec_SumA[i] > K)){
      tmpDepthB --;

    }
    ans = Math.max(ans, i + tmpDepthB + 2);
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


const main = (input) => {
  input = input.trim().split('\n')
  const [n, m, k] = input[0].split(' ').map(BigInt)
  const a = input[1].split(' ').map(BigInt)
  const b = input[2].split(' ').map(BigInt)

  let ans = 0

  const a_read = [], b_read = []
  let a_sum = 0n, b_sum = 0n

  for (let i=0; i<b.length; i++) {
    if (b_sum + b[i] <= k) {
      b_read.push(b[i])
      b_sum += b[i]
    }
    else break
  }

  for (let i=0; i<a.length; i++) {
    a_read.push(a[i])
    a_sum += a[i]

    while (a_sum + b_sum > k && b_read.length) b_sum -= b_read.pop()

    if (a_sum + b_sum > k) break

    ans = Math.max(ans, a_read.length + b_read.length)
  }

  return console.log(ans)
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))


const main = (input) => {
  input = input.trim().split('\n')
  const [n, m, k] = input[0].split(' ').map(BigInt)
  const a = input[1].split(' ').map(BigInt)
  const b = input[2].split(' ').map(BigInt)

  let ans = 0

  const a_read = [], b_read = []
  let a_sum = 0n, b_sum = 0n

  for (let i=0; i<b.length; i++) {
    if (b_sum + b[i] <= k) {
      b_read.push(b[i])
      b_sum += b[i]
    }
    else break
  }

  for (let i=0; i<a.length; i++) {
    a_read.push(a[i])
    a_sum += a[i]

    while (a_sum + b_sum > k && b_read.length) b_sum -= b_read.pop()

    if (a_sum + b_sum > k) return console.log(ans)

    ans = Math.max(ans, a_read.length + b_read.length)
  }

  return console.log(ans)
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))


const main = (input) => {
  input = input.trim().split('\n')
  const [n, m, k] = input[0].split(' ').map(BigInt)
  const a = input[1].split(' ').map(BigInt)
  const b = input[2].split(' ').map(BigInt)

  let ans = 0

  const a_read = [], b_read = []
  let a_sum = 0n, b_sum = 0n

  for (let i=0; i<b.length; i++) {
    if (b_sum + b[i] <= k) {
      b_read.push(b[i])
      b_sum += b[i]
    }
  }

  for (let i=0; i<a.length; i++) {
    a_read.push(a[i])
    a_sum += a[i]

    while (a_sum + b_sum > k && b_read.length) b_sum -= b_read.pop()

    if (a_sum + b_sum > k) return console.log(ans)

    ans = Math.max(ans, a_read.length + b_read.length)
  }

  return console.log(ans)
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

const (
	BUFSIZE   = 10000000
	MOD       = 1000000007
	INF_INT   = math.MaxInt32
	INF_INT64 = math.MaxInt64
)

var rdr *bufio.Reader

func main() {
	rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE)
	solve()
}

func solve() {
	N, M, K := readint3()
	A := readIntSlice(N)
	B := readIntSlice(M)

	ans := 0
	total := 0
	aI := -1
	for i, v := range A {
		if K-v >= 0 {
			ans += 1
			K -= v
		} else {
			break
		}
		aI = i
	}
	total = ans

	for _, v := range B {
		for K-v < 0 {
			if aI == -1 {
				break
			}
			K += A[aI]
			total -= 1
			aI -= 1
		}

		if K-v >= 0 {
			total += 1
			K -= v
		} else {
			break
		}
		ans = max(ans, total)
	}
	fmt.Println(ans)

}

func readline() string {
	buf := make([]byte, 0, 16)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			fmt.Println(e.Error())
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func readIntSlice(size int) []int {
	slice := make([]int, size)
	lines := strings.Split(readline(), " ")
	for i, v := range lines {
		slice[i] = s2i(v)
	}
	return slice
}

func readInt64Slice(size int) []int64 {
	slice := make([]int64, size)
	lines := strings.Split(readline(), " ")
	for i, v := range lines {
		slice[i] = s2i64(v)
	}
	return slice
}

func readint() int {
	return s2i(readline())
}

func readint2() (int, int) {
	lines := strings.Split(readline(), " ")
	return s2i(lines[0]), s2i(lines[1])
}

func readint3() (int, int, int) {
	lines := strings.Split(readline(), " ")
	return s2i(lines[0]), s2i(lines[1]), s2i(lines[2])
}

func readint4() (int, int, int, int) {
	lines := strings.Split(readline(), " ")
	return s2i(lines[0]), s2i(lines[1]), s2i(lines[2]), s2i(lines[3])
}

// For int64
func readint64() int64 {
	return s2i64(readline())
}

func b2i64(b bool) int64 {
	if b {
		return 1
	}
	return 0
}

func abs64(v int64) int64 {
	if v < 0 {
		return -v
	}
	return v
}

func min64(values ...int64) int64 {
	ret := int64(INF_INT64)
	for _, v := range values {
		if ret > v {
			ret = v
		}
	}
	return ret
}

func max64(values ...int64) int64 {
	ret := -int64(INF_INT64)
	for _, v := range values {
		if ret < v {
			ret = v
		}
	}
	return ret
}

func s2i64(s string) int64 {
	v, ok := strconv.ParseInt(s, 10, 64)
	if ok != nil {
		panic("Faild : " + s + " can't convert to int64")
	}
	return v
}

// For int
func b2i(b bool) int {
	if b {
		return 1
	}
	return 0
}

func abs(v int) int {
	if v < 0 {
		return -v
	}
	return v
}

func pow(x, y int) int {
	return int(math.Pow(float64(x), float64(y)))
}

func mod(x, y int) int {
	m := x % y
	if m < 0 {
		return m + y
	}
	return m
}

func min(values ...int) int {
	ret := INF_INT
	for _, v := range values {
		if ret > v {
			ret = v
		}
	}
	return ret
}

func max(values ...int) int {
	ret := -INF_INT
	for _, v := range values {
		if ret < v {
			ret = v
		}
	}
	return ret
}

func s2i(s string) int {
	v, ok := strconv.Atoi(s)
	if ok != nil {
		panic("Faild : " + s + " can't convert to int")
	}
	return v
}

func lcm(v1, v2 int) int {
	if v1 > v2 {
		v1, v2 = v2, v1
	}
	for v1 != 0 {
		v1, v2 = v2%v1, v1
	}
	return v2
}

func gcd(v1, v2 int) int {
	return v1 * v2 / lcm(v1, v2)
}

func bit(size int) [][]bool {
	bSize := int(math.Pow(2, float64(size)))
	b := make([][]bool, bSize)
	for i := 0; i < bSize; i++ {
		b[i] = make([]bool, size)
		for j := 0; j < size; j++ {
			if i>>j&1 == 1 {
				b[i][j] = true
			} else {
				b[i][j] = false
			}
		}
	}
	return b
}

/* ------------------------------------------------ */
/* Data stracture                                   */
/* ------------------------------------------------ */
type IntHeap []int

func (h *IntHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func (h IntHeap) Len() int           { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] < h[j] }
func (h IntHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	var n, m, k int
	fmt.Scanf("%d %d %d", &n, &m, &k)
	lines, _ := scanLongIntSlices(2, 11*200000)

	booksA := lines[0]
	booksB := lines[1]

	time := 0
	for _, t := range booksA {
		time += t
	}

	numA := n
	numB := 0
	maxCount := 0

	changed := true
	for changed {
		changed = false
		if time <= k && numA+numB > maxCount {
			maxCount = numA + numB
		}
		if numB < m && time <= k {
			time += booksB[numB]
			numB++
			changed = true
		} else if numA > 0 && time > k {
			time -= booksA[numA-1]
			numA--
			changed = true
		}
	}

	fmt.Printf("%d\n", maxCount)
}

func scanIntSlice(size int) []int {
	input := []int{}
	for i := 0; i < size; i++ {
		var in int
		fmt.Scanf("%d", &in)
		input = append(input, in)
	}
	return input
}

func scanLongIntSlices(lines int, maxBufSize int) ([][]int, error) {

	res := [][]int{}

	sc := bufio.NewScanner(os.Stdin)
	buf := make([]byte, bufio.MaxScanTokenSize)
	sc.Buffer(buf, maxBufSize)

	for sc.Scan() {
		line := sc.Text()
		strs := strings.Split(line, " ")
		ints := make([]int, len(strs))
		for i, c := range strs {
			n, err := strconv.Atoi(c)
			if err != nil {
				return nil, err
			}
			ints[i] = n
		}
		res = append(res, ints)
	}

	if err := sc.Err(); err != nil {
		return nil, err
	}

	return res, nil
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	SCANNER_BUF_SIZE = 2 << 20

	INF = int64(math.MaxInt64)
	MOD = 1e9 + 7
)

var (
	writer  *bufio.Writer
	scanner *bufio.Scanner
)

func init() {
	writer = bufio.NewWriter(os.Stdout)
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, SCANNER_BUF_SIZE), SCANNER_BUF_SIZE)
}

func printf(f string, a ...interface{}) {
	fmt.Fprintf(writer, f, a...)
}

func sint64() int64 {
	scanner.Scan()
	bb := scanner.Bytes()
	i := int64(0)
	if bb[0] == '-' {
		for _, b := range bb[1:] {
			i *= 10
			i -= int64(b - '0')
		}
		return i
	}
	for _, b := range bb {
		i *= 10
		i += int64(b - '0')
	}
	return i
}

func suint64() uint64 {
	scanner.Scan()
	bb := scanner.Bytes()
	i := uint64(0)
	for _, b := range bb {
		i *= 10
		i += uint64(b - '0')
	}
	return i
}

func sstring() string {
	scanner.Scan()
	return scanner.Text()
}

func gcd(a, b int64) int64 {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func lcm(a, b int64) int64 {
	return a * b / gcd(a, b)
}

func abs(a int64) int64 {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r < a {
			a = r
		}
	}
	return a
}

func max(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r > a {
			a = r
		}
	}
	return a
}

func main() {
	defer writer.Flush()
	n := sint64()
	m := sint64()
	k := sint64()
	a := make([]int64, n+1)
	for i := 1; i < len(a); i++ {
		a[i] = a[i-1] + sint64()
	}
	b := make([]int64, m+1)
	for i := 1; i < len(b); i++ {
		b[i] = b[i-1] + sint64()
	}
	printf("%d\n", sol(a,b,k))
}

func sol(a, b []int64, k int64) int64 {
	maxSoFar := int64(0)
	pb := 0
	for pb < len(b) && b[pb] <= k {
		pb++
	}
	pb--
	for i := range a {
		for pb >= 0 && b[pb] + a[i] > k {
			pb--
		}
		if pb < 0 {
			break
		}
		maxSoFar = max(maxSoFar, int64(i)+int64(pb))
	}
	return maxSoFar
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Tsundoku
	var N, M, K int
	fmt.Scan(&N, &M, &K)

	sc.Split(bufio.ScanWords)
	var temp int

	A := make([]int, N+1)
	sumA := make([]int, N+1)
	temp = 0
	for i := 1; i <= N; i++ {
		A[i] = nextInt()
		temp += A[i]
		sumA[i] = temp
	}

	B := make([]int, M+1)
	sumB := make([]int, M+1)
	temp = 0
	for i := 1; i <= M; i++ {
		B[i] = nextInt()
		temp += B[i]
		sumB[i] = temp
	}

	var J int = M
	var max int = 0
	for i := 0; i <= N; i++ {
		if sumA[i] > K {
			break
		}
		for j := J; 0 <= j; j-- {
			if sumA[i]+sumB[j] <= K {
				//if J > j {
				//	J = j
				//}

				if max < i+j {
					max = i + j
				}
				break
			} else {
				continue
			}
		}
	}

	fmt.Println(max)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Tsundoku
	var N, M, K int
	fmt.Scan(&N, &M, &K)

	sc.Split(bufio.ScanWords)
	var temp int

	A := make([]int, N+1)
	sumA := make([]int, N+1)
	temp = 0
	for i := 1; i <= N; i++ {
		A[i] = nextInt()
		temp += A[i]
		sumA[i] = temp
	}

	B := make([]int, M+1)
	sumB := make([]int, M+1)
	temp = 0
	for i := 1; i <= M; i++ {
		B[i] = nextInt()
		temp += B[i]
		sumB[i] = temp
	}

	var J int = M
	var max int = 0
	for i := 1; i <= N; i++ {
		if sumA[i] > K {
			break
		}
		for j := J; 1 <= j; j-- {
			if sumA[i]+sumB[j] <= K {
				if J > j {
					J = j
				}

				if max < i+j {
					max = i + j
				}
				break
			} else {
				continue
			}
		}
	}

	fmt.Println(max)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Tsundoku
	var N, M, K int
	fmt.Scan(&N, &M, &K)

	sc.Split(bufio.ScanWords)
	var temp int

	A := make([]int, N+1)
	sumA := make([]int, N+1)
	temp = 0
	for i := 1; i <= N; i++ {
		A[i] = nextInt()
		temp += A[i]
		sumA[i] = temp
	}

	B := make([]int, M+1)
	sumB := make([]int, M+1)
	temp = 0
	for i := 1; i <= M; i++ {
		B[i] = nextInt()
		temp += B[i]
		sumB[i] = temp
	}

	var J int = M
	var max int = 0
	for i := 1; i <= N; i++ {
		if sumA[i] > K {
			break
		}
		for j := J; 0 <= j; j-- {
			if sumA[i]+sumB[j] <= K {
				if J > j {
					J = j
				}

				if max < i+j {
					max = i + j
				}
				break
			} else {
				continue
			}
		}
	}

	fmt.Println(max)
}


#ABC172C.rb
n,m,k = gets.split.map(&:to_i)
ar = gets.split.map(&:to_i)
br = gets.split.map(&:to_i)

max_count = 0
asum = 0
bsum = br.sum
j = m

(0..n).each do |i|
  if i == 0
    asum = 0
  else
    asum += ar[i-1]
  end

  if asum > k
    break
  end

  while bsum > k - asum
    j -= 1
    bsum -= br[j]
  end

  count = i + j

  if max_count < count
    max_count = count
  end
end

puts max_count


n,m,k = gets.chomp.split.map(&:to_i)
as = gets.chomp.split.map(&:to_i)
bs = gets.chomp.split.map(&:to_i)

max_cnt = 0
asum = 0
bsum = bs.sum
j = m

for i in 0..n do
    if i == 0
       asum = 0
       a = 0
    else
       asum += as[i-1]
    end
    break if asum > k
    while bsum > k - asum do
        j -= 1
	    bsum -= bs[j]
    end
    cnt = i + j
    if max_cnt < cnt
        max_cnt = cnt
    end
end

puts max_cnt


_,_,K = gets.split.map(&:to_i)
A = [*gets.split.map(&:to_i),K+1]
B = [0,*gets.split.map(&:to_i),K+1]

n,k,a,b = 0,K-A.sum,A.size,0
begin
	(a-=1; k+=A[a]) while 0<a && k<B[b]
	(k-=B[b]; b+=1) while B[b]<=k
	n = a+b-1 if n<a+b-1
end while 0<a
p n


x = gets.chomp.split.map(&:to_i)
read_a = gets.chomp.split.map(&:to_i)
read_b = gets.chomp.split.map(&:to_i)

read_a.concat(read_b)

read_a.sort

read_total = 0
read_count = 0
i=0

while read_total < x[2] do
  read_total += read_a[i]
  i += 1
  read_count += 1
end

p read_count


n, m, k = gets.split.map(&:to_i)
a_arr = gets.split.map(&:to_i)
b_arr = gets.split.map(&:to_i)

sum = 0
sum_a_arr = [[0, 0]]
a_arr.each_with_index do |num, i|
  sum += num
  sum_a_arr << [sum, i + 1]
end

sum = 0
sum_b_arr = [[0, 0]]
b_arr.each_with_index do |num, i|
  sum += num
  sum_b_arr << [sum, i + 1]
end

max = 0
ind = 0
sum_a_arr.reverse_each do |num, count|
  next if num > k

  c = count
  while ind < b_arr.length
    num2, count2 = sum_b_arr[ind]
    break if num + num2 > k

    ind += 1
    c = count + count2
  end

  max = c if max < c
end

p max


n, m, k = gets.split.map(&:to_i)
a_arr = gets.split.map(&:to_i)
b_arr = gets.split.map(&:to_i)

sum = 0
sum_a_arr = []
a_arr.each_with_index do |num, i|
  sum += num
  sum_a_arr << [sum, i + 1]
end

sum = 0
sum_b_arr = []
b_arr.each_with_index do |num, i|
  sum += num
  sum_b_arr << [sum, i + 1]
end

max = 0
ind = 0
sum_a_arr.reverse_each do |num, count|
  next if num > k

  c = count
  while ind < b_arr.length
    num2, count2 = sum_b_arr[ind]
    break if num + num2 > k

    ind += 1
    c = count + count2
  end

  max = c if max < c
end

p max


fn main() {
    let input: Vec<i32> = read_vec();
    let k = input[2];

    // それぞれの山から読むことのできるところまでを取る
    let a: Vec<i32> = take_by_time(k, &read_vec());
    let b: Vec<i32> = take_by_time(k, &read_vec());

    println!("{}", max_read(k, &a, &b));
}

fn read<T: std::str::FromStr>() -> T {
    let mut buf = String::new();
    std::io::stdin().read_line(&mut buf).ok();
    buf.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|s| s.parse().ok().unwrap())
        .collect()
}

fn take_by_time(k: i32, books: &[i32]) -> Vec<i32> {
    let mut v = vec![0];
    books
        .iter()
        .scan(0, |state, cur| {
            if k - *state - cur < 0 {
                return None;
            }

            *state += cur;
            Some(*state)
        })
        .for_each(|n| v.push(n));
    v
}

fn max_read(k: i32, a: &[i32], b: &[i32]) -> i32 {
    let mut ans: i32 = 0;
    let mut j = b.len() - 1;

    a.iter().enumerate().for_each(|(i, &a)| {
        while b[j] > k - a {
            j -= 1;
        }

        ans = ans.max((i + j) as i32);
    });

    ans
}


use proconio::input;

fn main() {
    input!(n: usize, m: usize, k: u64, a: [u64; n], b: [u64; m]);

    let ans = (0..=n)
        .scan((m, b.iter().sum::<u64>()), |(j, time), i| {
            while *time > k && *j > 0 {
                *j -= 1;
                *time -= b[*j];
            }
            let ret = if *time > k { None } else { Some(i + *j) };
            if i < n {
                *time += a[i];
            }
            ret
        })
        .max()
        .unwrap_or(0);

    println!("{}", ans);
}


#![allow(clippy::needless_range_loop)]

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        #[allow(unused_mut)]
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
        a: [usize; n],
        b: [usize; m],
    };

    let mut sum: usize = a.iter().sum();
    let mut ans: usize = 0;
    let mut b_index: usize = 0;
    for a_index in (0..=n).rev() {
        if a_index != n {
            sum -= a[a_index];
        }

        while b_index < m && sum + b[b_index] <= k {
            sum += b[b_index];
            b_index += 1;
        }

        if sum <= k && ans < a_index + b_index {
            ans = a_index + b_index;
        }
    }
    println!("{}", ans);
}


use proconio::{input, fastout};
use std::cmp::{max};

#[fastout]
fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
        a: [usize; n],
        b: [usize; m],
    }
    let mut temp_cost = 0;
    let mut i = 0;
    while i < a.len() {
        if k < (temp_cost + a[i]) {
            break;
        }
        temp_cost += a[i];
        i += 1;
    }
    let mut res = i;
    let mut j = 0;
    // while j < b.len() && k >= (temp_cost - a[i] + b[j]) {
    while j < b.len() {
        if k >= temp_cost + b[j] {
            temp_cost += b[j];
            j += 1;
            res = max(i + j, res);
        } else {
            if i == 0 {
                break;
            }
            temp_cost -= a[i];
            i -= 1;
        }
    }
    println!("{}", res);
}


use proconio::{input, fastout};
use std::cmp::{max};

#[fastout]
fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
        a: [usize; n],
        b: [usize; m],
    }
    let mut temp_cost = 0;
    let mut i = 0;
    while i < a.len() {
        if k < (temp_cost + a[i]) {
            break;
        }
        temp_cost += a[i];
        i += 1;
    }
    let mut res = i;
    let mut j = 0;
    // while j < b.len() && k >= (temp_cost - a[i] + b[j]) {
    while j < b.len() {
        if k >= temp_cost + b[j] {
            temp_cost += b[j];
            j += 1;
            res = max(i + j, res);
        } else {
            if i == 0 {
                break;
            }
            temp_cost -= a[i];
            i -= 1;
            temp_cost += b[j];
            j += 1;
            res = max(i + j, res);
        }
    }
    println!("{}", res);
}