import java.util.*;
import java.io.*;
public class Main {
    static class Scan {
        private byte[] buf=new byte[1024];
        private int index;
        private InputStream in;
        private int total;
        public Scan()
        {
            in=System.in;
        }
        public int scan()throws IOException
        {
            if(total<0)
            throw new InputMismatchException();
            if(index>=total)
            {
                index=0;
                total=in.read(buf);
                if(total<=0)
                return -1;
            }
            return buf[index++];
        }
        public int scanInt()throws IOException
        {
            int integer=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n))
            {
                if(n>='0'&&n<='9')
                {
                    integer*=10;
                    integer+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            return neg*integer;
        }
        public double scanDouble()throws IOException
        {
            double doub=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n)&&n!='.')
            {
                if(n>='0'&&n<='9')
                {
                    doub*=10;
                    doub+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            if(n=='.')
            {
                n=scan();
                double temp=1;
                while(!isWhiteSpace(n))
                {
                    if(n>='0'&&n<='9')
                    {
                        temp/=10;
                        doub+=(n-'0')*temp;
                        n=scan();
                    }
                    else throw new InputMismatchException();
                }
            }
            return doub*neg;
        }
        public String scanString()throws IOException
        {
            StringBuilder sb=new StringBuilder();
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            while(!isWhiteSpace(n))
            {
                sb.append((char)n);
                n=scan();
            }
            return sb.toString();
        }
        private boolean isWhiteSpace(int n)
        {
            if(n==' '||n=='\n'||n=='\r'||n=='\t'||n==-1)
            return true;
            return false;
        }
    }
    static long prefix[],dp[][];
    static int n,m,k;
    public static void main(String args[]) throws IOException {
        Scan input=new Scan();
        n=input.scanInt();
        m=input.scanInt();
        k=input.scanInt();
        long arr[]=new long[n];
        dp=new long[5001][5001];
        prefix=new long[n];
        for(int i=0;i<n;i++) {
            arr[i]=input.scanInt();
        }
        prefix[0]=arr[0];
        for(int i=1;i<n;i++) {
            prefix[i]=prefix[i-1]+arr[i];
        }
        for(int i=0;i<5001;i++) {
            for(int j=0;j<5001;j++) {
                dp[i][j]=-1L;
            }
        }
        System.out.println(solve(0,0));
    }
    public static long solve(int indx,int strt) {
        if(indx==k) {
            return 0;
        }
        if(dp[indx][strt]!=-1) {
            return dp[indx][strt];
        }
        long max=0;
        for(int i=strt;i+m-1<n;i++) {
            max=Math.max(max,solve(indx+1,i+m)+range_sum(i,i+m-1));
        }
        dp[indx][strt]=max;
        return max;
    }
    public static long range_sum(int l,int r) {
        if(r==0 || l==0) {
            return prefix[r];
        }
        return prefix[r]-prefix[l-1];
    }
}


import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Random;

public class Solution {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {
            _Scanner sc = new _Scanner(System.in);

            int n = sc.nextInt();
            int m = sc.nextInt();
            int k = sc.nextInt();
            long[][] dp = new long[2][10_001];

            long[] prefix = new long[n + 1];
            for (int i = 0; i < n; i++) prefix[i + 1] = sc.nextLong() + prefix[i];

            for (int j = 1; j <= k; j++) {
                for (int i = n - m; i >= 0; i--) {
                    dp[j % 2][i] = Math.max(prefix[i + m] - prefix[i] + dp[(j + 1) % 2][i + m], dp[j % 2][i + 1]);
                }
            }

            out.println(dp[k % 2][0]);
        }
    }

    private static void reverse(int[] vs) {
        for (int i = 0; i < vs.length / 2; i++) {
            swap(vs, i, vs.length - 1 - i);
        }
    }

    static class _Scanner {
        InputStream is;
        _Scanner(InputStream is) {
            this.is = is;
        }
        byte[] bb = new byte[1 << 15];
        int k, l;
        byte getc() {
            try {
                if (k >= l) {
                    k = 0;
                    l = is.read(bb);
                    if (l < 0) return -1;
                }
                return bb[k++];
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        byte skip() {
            byte b;
            while ((b = getc()) <= 32)
                ;
            return b;
        }

        int nextInt() {
            int n = 0;
            int sig = 1;
            for (byte b = skip(); b > 32; b = getc()) {
                if (b == '-') {
                    sig = -1;
                } else {
                    n = n * 10 + b - '0';
                }
            }
            return sig * n;
        }

        long nextLong() {
            long n = 0;
            long sig = 1;
            for (byte b = skip(); b > 32; b = getc()) {
                if (b == '-') {
                    sig = -1;
                } else {
                    n = n * 10 + b - '0';
                }
            }
            return sig * n;
        }

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

        public String next() {
            StringBuilder sb = new StringBuilder();
            for (int b = skip(); b > 32; b = getc()) {
                sb.append(((char) b));
            }
            return sb.toString();
        }
    }

    private static void shuffle(int[] ar) {
        Random rnd = new Random();
        for (int i = 0; i < ar.length; i++) {
            int j = i + rnd.nextInt(ar.length - i);
            swap(ar, i, j);
        }
    }

    private static void shuffle(Object[] ar) {
        Random rnd = new Random();
        for (int i = 0; i < ar.length; i++) {
            int j = i + rnd.nextInt(ar.length - i);
            swap(ar, i, j);
        }
    }

    private static void swap(int[] ar, int i, int j) {
        int t = ar[i];
        ar[i] = ar[j];
        ar[j] = t;
    }

    private static void swap(Object[] ar, int i, int j) {
        Object t = ar[i];
        ar[i] = ar[j];
        ar[j] = t;
    }

}


import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Random;

public class Solution {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {
            _Scanner sc = new _Scanner(System.in);

            int n = sc.nextInt();
            int m = sc.nextInt();
            int k = sc.nextInt();
            long[][] dp = new long[k+1][10_001];

            long[] prefix = new long[n + 1];
            for (int i = 0; i < n; i++) prefix[i + 1] = sc.nextLong() + prefix[i];

            for (int j = 1; j <= k; j++) {
                for (int i = n - m; i >= 0; i--) {
                    dp[j][i] = Math.max(prefix[i + m] - prefix[i] + dp[j - 1][i + m], dp[j][i + 1]);
                }
            }

            out.println(dp[k][0]);
        }
    }

    private static void reverse(int[] vs) {
        for (int i = 0; i < vs.length / 2; i++) {
            swap(vs, i, vs.length - 1 - i);
        }
    }

    static class _Scanner {
        InputStream is;
        _Scanner(InputStream is) {
            this.is = is;
        }
        byte[] bb = new byte[1 << 15];
        int k, l;
        byte getc() {
            try {
                if (k >= l) {
                    k = 0;
                    l = is.read(bb);
                    if (l < 0) return -1;
                }
                return bb[k++];
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        byte skip() {
            byte b;
            while ((b = getc()) <= 32)
                ;
            return b;
        }

        int nextInt() {
            int n = 0;
            int sig = 1;
            for (byte b = skip(); b > 32; b = getc()) {
                if (b == '-') {
                    sig = -1;
                } else {
                    n = n * 10 + b - '0';
                }
            }
            return sig * n;
        }

        long nextLong() {
            long n = 0;
            long sig = 1;
            for (byte b = skip(); b > 32; b = getc()) {
                if (b == '-') {
                    sig = -1;
                } else {
                    n = n * 10 + b - '0';
                }
            }
            return sig * n;
        }

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

        public String next() {
            StringBuilder sb = new StringBuilder();
            for (int b = skip(); b > 32; b = getc()) {
                sb.append(((char) b));
            }
            return sb.toString();
        }
    }

    private static void shuffle(int[] ar) {
        Random rnd = new Random();
        for (int i = 0; i < ar.length; i++) {
            int j = i + rnd.nextInt(ar.length - i);
            swap(ar, i, j);
        }
    }

    private static void shuffle(Object[] ar) {
        Random rnd = new Random();
        for (int i = 0; i < ar.length; i++) {
            int j = i + rnd.nextInt(ar.length - i);
            swap(ar, i, j);
        }
    }

    private static void swap(int[] ar, int i, int j) {
        int t = ar[i];
        ar[i] = ar[j];
        ar[j] = t;
    }

    private static void swap(Object[] ar, int i, int j) {
        Object t = ar[i];
        ar[i] = ar[j];
        ar[j] = t;
    }

}


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

public class Main {

	static long sx = 0, sy = 0, m = (long) (1e9 + 7);

	static ArrayList<Integer>[] a;
	static long[][] dp;
	static int[] size;
	static long[] farr;
	// static boolean b = true;

	// static TreeMap<Integer, Integer> hm = new TreeMap<>();
	public static PrintWriter out;
	// static ArrayList<pair> p = new ArrayList<>();
	static long[] fact = new long[(int) 1e6];
	static boolean b = false;
	static StringBuilder sb = new StringBuilder();
	static boolean cycle = false;
	static long mod = 998244353;
	static long[] no, col;
	static String s;
	static int ans = 0;
	static HashSet<Long>[] hm;
	static int[] dis;

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

		// Scanner scn = new Scanner(new BufferedReader(new
		// InputStreamReader(System.in)));

		out = new PrintWriter(System.out);
		Reader scn = new Reader();

		int n = scn.nextInt(), m = scn.nextInt(), k = scn.nextInt();

		 dp = new long[n+1][k+1];

		 for(int i=0; i<=n; i++)
			 Arrays.fill(dp[i], -1);

		long[] a = scn.nextLongArray(n);

		for (int i = 1; i < n; i++)
			a[i] += a[i - 1];

		long ans = f(a, m, 0, k);
		System.out.println(ans);
	}

	private static long f(long[] a, int m, int i, int k) {

		if (i == a.length || k == 0)
			return 0;

		if(dp[i][k]!=-1)
			 return dp[i][k];

		long ans = f(a, m, i + 1, k);

		if (i + m - 1 < a.length)
			ans = Math.max(ans, f(a, m, i + m, k - 1) + a[i + m - 1] - (i - 1 >= 0 ? a[i - 1] : 0));

		return dp[i][k] =ans;
	}
	// _________________________TEMPLATE_____________________________________________________________

	// public static long lcm(long x, long y) {
	//
	// return (x * y) / gcd(x, y);
	// }
	//
	// private static long gcd(long x, long y) {
	// if (x == 0)
	// return y;
	//
	// return gcd(y % x, x);
	// }

	// static class comp implements Comparator<Integer> {
	//
	// @Override
	// public int compare(Integer o1, Integer o2) {
	// return depth[o2] - depth[o1];
	// }
	//
	// }

	// public static long pow(long a, long b) {
	//
	// if(b<0)return 0;
	// if (b == 0 || b == 1)
	// return (long) Math.pow(a, b);
	//
	// if (b % 2 == 0) {
	//
	// long ret = pow(a, b / 2);
	// ret = (ret % mod * ret % mod) % mod;
	// return ret;
	// }
	//
	// else {
	// return ((pow(a, b - 1) % mod) * a % mod) % mod;
	// }
	// }

	private static class pair implements Comparable<pair> {

		long val, col;

		pair(long a, long b) {

			val = a;
			col = b;
		}

		@Override
		public int compareTo(pair o) {

			if (this.val < o.val)
				return 1;
			else
				return -1;
		}

	}

	private static String reverse(String s) {

		return new StringBuilder(s).reverse().toString();
	}

	public static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

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

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

		public String readLine() throws IOException {
			byte[] buf = new byte[1000000 + 1]; // 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 nextInt() 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 nextLong() 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 nextDouble() 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;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			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();
		}

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

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

		public int[][] nextInt2DArray(int m, int n) throws IOException {
			int[][] arr = new int[m][n];
			for (int i = 0; i < m; i++) {
				for (int j = 0; j < n; j++)
					arr[i][j] = nextInt();
			}
			return arr;
		}

		public long[][] nextInt2DArrayL(int m, int n) throws IOException {
			long[][] arr = new long[m][n];
			for (int i = 0; i < m; i++) {
				for (int j = 0; j < n; j++)
					arr[i][j] = nextInt();
			}
			return arr;
		}
		// kickstart - Solution
		// atcoder - Main
	}

}


import java.util.*;

public class Solution
{
    static int dp[][];
    static int max(int pos , int m , int k , int sum[] )
    {
        if(k < 0)
        return Integer.MIN_VALUE;

        if(pos >= sum.length)
        {
            if(k == 0)
            return 0;

            return Integer.MIN_VALUE;
        }

        if(dp[pos][k] != -1)
        return dp[pos][k];

        if(pos + m - 1 < sum.length)
        {
        int a = max(pos + 1 , m , k , sum);
        int b = 0;
        if(pos == 0)
            b = sum[pos + m - 1];

            else
            b = sum[pos + m - 1] - sum[pos - 1];

        dp[pos][k] =  Math.max(a , b + max(pos + m , m , k - 1 , sum));
        }

        else
        dp[pos][k] = 0;
        return dp[pos][k];
    }
    public static void main(String []args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();

        int arr[] = new int[n];
        for(int i = 0 ; i < n ; i++)
        {
            arr[i] = sc.nextInt();
        }

        int sum[] = new int[n];
        sum[0] = arr[0];
        for(int i = 1 ; i < n ; i++)
        {
            sum[i] = sum[i - 1] + arr[i];
        }
        dp = new int[n][k + 1];
        for(int i = 0 ; i < n ; i++)
        {
            for(int j = 0 ; j <= k ; j++)
            {
                dp[i][j] = -1;
            }
        }

        System.out.println(max(0 , m , k , sum));
    }
}


import java.util.*;

public class Solution
{
    static long dp[][];
    static long max(int pos , int m , int k , long sum[] )
    {
        if(k < 0)
        return Long.MIN_VALUE;

        if(pos >= sum.length)
        {
            if(k == 0)
            return 0;

            return Long.MIN_VALUE;
        }

        if(dp[pos][k] != -1)
        return dp[pos][k];

        if(pos + m - 1 < sum.length)
        {
        long a = max(pos + 1 , m , k , sum);
        long b = 0;
        if(pos == 0)
            b = sum[pos + m - 1];

            else
            b = sum[pos + m - 1] - sum[pos - 1];

        dp[pos][k] =  Math.max(a , b + max(pos + m , m , k - 1 , sum));
        }

        else
        dp[pos][k] = 0;
        return dp[pos][k];
    }
    public static void main(String []args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();

        int arr[] = new int[n];
        for(int i = 0 ; i < n ; i++)
        {
            arr[i] = sc.nextInt();
        }

        long sum[] = new long[n];
        sum[0] = arr[0];
        for(int i = 1 ; i < n ; i++)
        {
            sum[i] = sum[i - 1] + arr[i];
        }
        dp = new long[n][k + 1];
        for(int i = 0 ; i < n ; i++)
        {
            for(int j = 0 ; j <= k ; j++)
            {
                dp[i][j] = -1;
            }
        }

        System.out.println(max(0 , m , k , sum));
    }
}


import java.util.*;

public class Solution
{
    static long dp[][];
    static long max(int pos , int m , int k , int sum[] )
    {
        if(k < 0)
        return Long.MIN_VALUE;

        if(pos >= sum.length)
        {
            if(k == 0)
            return 0;

            return Long.MIN_VALUE;
        }

        if(dp[pos][k] != -1)
        return dp[pos][k];

        if(pos + m - 1 < sum.length)
        {
        long a = max(pos + 1 , m , k , sum);
        long b = 0;
        if(pos == 0)
            b = sum[pos + m - 1];

            else
            b = sum[pos + m - 1] - sum[pos - 1];

        dp[pos][k] =  Math.max(a , b + max(pos + m , m , k - 1 , sum));
        }

        else
        dp[pos][k] = 0;
        return dp[pos][k];
    }
    public static void main(String []args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();

        int arr[] = new int[n];
        for(int i = 0 ; i < n ; i++)
        {
            arr[i] = sc.nextInt();
        }

        int sum[] = new int[n];
        sum[0] = arr[0];
        for(int i = 1 ; i < n ; i++)
        {
            sum[i] = sum[i - 1] + arr[i];
        }
        dp = new int[n][k + 1];
        for(int i = 0 ; i < n ; i++)
        {
            for(int j = 0 ; j <= k ; j++)
            {
                dp[i][j] = -1;
            }
        }

        System.out.println(max(0 , m , k , sum));
    }
}


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

public class GeorgeJob {
    static class Solver {
        public void solve(MyReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            int[] arr = in.nextIntArray(n);
            long[] pre = new long[n+1];

            for (int i = 1;i<=n;i++){
                pre[i] = pre[i-1] + arr[i-1];
            }

            PriorityQueue<Long> pq = new PriorityQueue<>(Collections.reverseOrder());

            for (int i = 0;i<=n-m;i++){
                pq.add(pre[i+m] - pre[i]);
            }

            long ans = 0;
            while (k-- > 0)ans += pq.poll();

            out.println(ans);

        }

    }

    public static void main(String[] args) {
        MyReader mr = new MyReader();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        new Solver().solve(mr, out);
        out.close();
    }

    //////////////////////////////////////////////////////////////////////////
    //    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}};
//    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}, {-1,-1},{-1,1}, {1,1}, {1,-1}};
    static class MyReader {
        BufferedReader br;
        StringTokenizer st;

        MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

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

        String nextLine() {
            String res = "";
            try {
                res = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }

            return res;
        }

        int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Integer[] nextIntegerArray(int n) {
            Integer[] arr = new Integer[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Long[] nextLongArray(int n) {
            Long[] arr = new Long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        long[] nextlongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        String[] nextStringArray(int n) {
            String[] arr = new String[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next();
            }
            return arr;
        }
    }

    /////////////////////////////////////////////////////////////

    static class Pair<K, V> {
        K x;
        V y;

        public Pair(K x, V y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Pair<?, ?> pair = (Pair<?, ?>) o;
            return Objects.equals(x, pair.x) &&
                    Objects.equals(y, pair.y);
        }

        @Override
        public int hashCode() {
            return Objects.hash(x, y);
        }
    }

    /////////////////////////////////////////////////////////////

    static <T> void swap(T[] arr, int i, int j) {
        T tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

}


import java.io.*;
import java.util.Arrays;
import java.util.Objects;
import java.util.StringTokenizer;

public class GeorgeJob {
    static class Solver {
        int n, m;
        long[] pre;
        long[][] dp;
        public void solve(MyReader in, PrintWriter out) {
            n = in.nextInt();
            m = in.nextInt();
            int k = in.nextInt();

            int[] arr = in.nextIntArray(n);
            pre = new long[n + 1];

            for (int i = 1; i <= n; i++) {
                pre[i] = pre[i - 1] + arr[i - 1];
            }

            dp = new long[n+1][k+1];
            for (var d : dp) Arrays.fill(d,-1);

            out.println(calc(0,k));

        }

        long calc(int l, int k){
            if (k == 0)return 0;
            if (l+m > n && k!= 0)return Long.MIN_VALUE;

            if (dp[l][k] != -1)return dp[l][k];

            long ans = 0;
            ans = Math.max(ans, pre[l+m] - pre[l] + calc(l+m,k-1));
            ans = Math.max(ans,calc(l+1,k));

            return dp[l][k] = ans;
        }

    }

    public static void main(String[] args) {
        MyReader mr = new MyReader();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        new Solver().solve(mr, out);
        out.close();
    }

    //////////////////////////////////////////////////////////////////////////
    //    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}};
//    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}, {-1,-1},{-1,1}, {1,1}, {1,-1}};
    static class MyReader {
        BufferedReader br;
        StringTokenizer st;

        MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

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

        String nextLine() {
            String res = "";
            try {
                res = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }

            return res;
        }

        int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Integer[] nextIntegerArray(int n) {
            Integer[] arr = new Integer[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Long[] nextLongArray(int n) {
            Long[] arr = new Long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        long[] nextlongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        String[] nextStringArray(int n) {
            String[] arr = new String[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next();
            }
            return arr;
        }
    }

    /////////////////////////////////////////////////////////////

    static class Pair<K, V> {
        K x;
        V y;

        public Pair(K x, V y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Pair<?, ?> pair = (Pair<?, ?>) o;
            return Objects.equals(x, pair.x) &&
                    Objects.equals(y, pair.y);
        }

        @Override
        public int hashCode() {
            return Objects.hash(x, y);
        }
    }

    /////////////////////////////////////////////////////////////

    static <T> void swap(T[] arr, int i, int j) {
        T tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

}


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

public class GeorgeJob {
    static class Solver {
        public void solve(MyReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            int[] arr = in.nextIntArray(n);
            long[] pre = new long[n+1];

            for (int i = 1;i<=n;i++){
                pre[i] = pre[i-1] + arr[i-1];
            }

            long ans = 0;

            PriorityQueue<Long> pq = new PriorityQueue<>(Collections.reverseOrder());

            for (int i = 0;i<=n-m;i++){
//                pq.add(pre[i+m] - pre[i]);
                pq.clear();

                int a = i;
                for (int j = 0; j <= n-m; j++) {
                    if (a+m > n)break;
                    pq.add(pre[a+m] - pre[a]);
                    a+=m;
                }
                long sum = 0;
                if (pq.size() < k)continue;
                for (int j = 0; j < k; j++) {
                    sum += pq.poll();
                }

                ans = Math.max(ans,sum);

            }
            out.println(ans);

        }

    }

    public static void main(String[] args) {
        MyReader mr = new MyReader();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        new Solver().solve(mr, out);
        out.close();
    }

    //////////////////////////////////////////////////////////////////////////
    //    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}};
//    static int[][] dir = {{0,1}, {1,0},{-1,0}, {0,-1}, {-1,-1},{-1,1}, {1,1}, {1,-1}};
    static class MyReader {
        BufferedReader br;
        StringTokenizer st;

        MyReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

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

        String nextLine() {
            String res = "";
            try {
                res = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }

            return res;
        }

        int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Integer[] nextIntegerArray(int n) {
            Integer[] arr = new Integer[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }

            return arr;
        }

        Long[] nextLongArray(int n) {
            Long[] arr = new Long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        long[] nextlongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }

            return arr;
        }

        String[] nextStringArray(int n) {
            String[] arr = new String[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next();
            }
            return arr;
        }
    }

    /////////////////////////////////////////////////////////////

    static class Pair<K, V> {
        K x;
        V y;

        public Pair(K x, V y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Pair<?, ?> pair = (Pair<?, ?>) o;
            return Objects.equals(x, pair.x) &&
                    Objects.equals(y, pair.y);
        }

        @Override
        public int hashCode() {
            return Objects.hash(x, y);
        }
    }

    /////////////////////////////////////////////////////////////

    static <T> void swap(T[] arr, int i, int j) {
        T tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

}


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

public class Main
{
    public static void process()throws IOException
    {
		int n=ni(),m=ni(),k=ni();
		long pref[]=new long[n+1];

		for(int i=1;i<=n;i++)
			pref[i]=pref[i-1]+nl();

		long dp[][]=new long[k+1][n+1];

		for(int i=1;i<=k;i++){// ith seq ending at jth position
			for(int j=m;j<=n;j++){
				dp[i][j]=Math.max(dp[i][j-1], dp[i-1][j-m]+pref[j]-pref[j-m]);
			}
		}
		pn(dp[k][n]);
    }

    static FastReader sc;
    static PrintWriter out;
    public static void main(String[]args)throws IOException
    {
        out = new PrintWriter(System.out);
        sc=new FastReader();

        long s = System.currentTimeMillis();
        int t=1;
        //t=ni();
        while(t-->0)
            process();

        out.flush();
        System.err.println(System.currentTimeMillis()-s+"ms");
    }

    static void pn(Object o){out.println(o);}
    static void p(Object o){out.print(o);}
    static int ni()throws IOException{return Integer.parseInt(sc.next());}
    static long nl()throws IOException{return Long.parseLong(sc.next());}
    static double nd()throws IOException{return Double.parseDouble(sc.next());}
    static String nln()throws IOException{return sc.nextLine();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}

    static long mod=(long)1e9+7l;

    static<T> void r_sort(T arr[],int n){
        Random r = new Random();
        for (int i = n-1; i > 0; i--){
            int j = r.nextInt(i+1);

            T temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        Arrays.sort(arr);
    }

/////////////////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;

        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next(){
            while (st == null || !st.hasMoreElements()){
                try{ st = new StringTokenizer(br.readLine()); } catch (IOException  e){ e.printStackTrace(); }
            }
            return st.nextToken();
        }

        String nextLine(){
            String str = "";
            try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }
            return str;
        }
    }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}


/**
 * @author derrick20
 */
import java.io.*;
import java.util.*;

public class GeorgeJob implements Runnable {
    public static void main(String[] args) throws Exception {
        new Thread(null, new GeorgeJob(), ": )", 1 << 28).start();
    }

    public void run() {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int K = sc.nextInt();
        long[] pre = new long[N + 1];
        for (int i = 1; i <= N; i++) {
            pre[i] = pre[i - 1] + sc.nextLong();
        }

        long[][] dp = new long[N + 1][K + 1];
        for (int k = 1; k <= K; k++) {
            for (int i = 1; i <= N; i++) {
                dp[i][k] = dp[i - 1][k];
                if (i >= M) {
                    dp[i][k] = Math.max(dp[i][k], pre[i] - pre[i - M] + dp[i - M][k - 1]);
                }
            }
        }
        out.println(dp[N][K]);
        out.close();
    }

    static class FastScanner {
        private int BS = 1 << 16;
        private char NC = (char) 0;
        private byte[] buf = new byte[BS];
        private int bId = 0, size = 0;
        private char c = NC;
        private double cnt = 1;
        private BufferedInputStream in;

        public FastScanner() {
            in = new BufferedInputStream(System.in, BS);
        }

        public FastScanner(String s) {
            try {
                in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
            } catch (Exception e) {
                in = new BufferedInputStream(System.in, BS);
            }
        }

        private char getChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }

        public int nextInt() {
            return (int) nextLong();
        }

        public int[] nextInts(int N) {
            int[] res = new int[N];
            for (int i = 0; i < N; i++) {
                res[i] = (int) nextLong();
            }
            return res;
        }

        public long[] nextLongs(int N) {
            long[] res = new long[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long nextLong() {
            cnt = 1;
            boolean neg = false;
            if (c == NC) c = getChar();
            for (; (c < '0' || c > '9'); c = getChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = getChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                cnt *= 10;
            }
            return neg ? -res : res;
        }

        public double nextDouble() {
            double cur = nextLong();
            return c != '.' ? cur : cur + nextLong() / cnt;
        }

        public double[] nextDoubles(int N) {
            double[] res = new double[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextDouble();
            }
            return res;
        }

        public String next() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c > 32) {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public String nextLine() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c != '\n') {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public boolean hasNext() {
            if (c > 32) return true;
            while (true) {
                c = getChar();
                if (c == NC) return false;
                else if (c > 32) return true;
            }
        }
    }

    static void ASSERT(boolean assertion, String message) {
        if (!assertion) throw new AssertionError(message);
    }

    static void ASSERT(boolean assertion) {
        if (!assertion) throw new AssertionError();
    }
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf131 implements Runnable
{
    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

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

        public int read()
        {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt()
        {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

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

            int res = 0;
            do
            {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }

        public double nextDouble()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.')
            {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.')
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception
    {
        new Thread(null, new Cf131(),"Main",1<<27).start();
    }

    static class Pair{
		int nod;
		int ucn;

		Pair(int nod,int ucn){
			this.nod=nod;
			this.ucn=ucn;
		}

	public static Comparator<Pair> wcompr = new Comparator<Pair>(){
		public int compare(Pair e1,Pair e2){
            //reverse order
			if (e1.ucn < e2.ucn)
                return 1;
            else if (e1.ucn > e2.ucn)
                return -1;
            return 0;
		}
	};
	}

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

    public void run()
    {
        InputReader sc = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        //int t= sc.nextInt();
        //while(t-->0){
            int n = sc.nextInt();
            int m = sc.nextInt();
            int k = sc.nextInt();
            Long[] a = new Long[n+1]; a[0] = (long)0;
            long[][] dp = new long[k+1][n+1]; dp[0][0] = 0;

            for(int i=1;i<=n;i++){  a[i] = a[i-1] + sc.nextLong();   dp[0][i] = 0;  }
            for(int i=1;i<=k;i++)dp[i][0] = 0;

            long ans = Long.MIN_VALUE;

            for(int i=1;i<=k;i++){
                int j = (i-1)*m + 1;
                long max = Long.MIN_VALUE;
                for(;j<=(n-m+1);j++){
                    max = Math.max(max,dp[i-1][Math.max(j-m,0)]);
                    dp[i][j] = a[j+m-1]-a[j-1] + max;
                    ans = Math.max(ans,dp[i][j]);
                }
            }

            w.println(ans);

        //}
        w.flush();
        w.close();
    }

}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Cf131 implements Runnable
{
    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

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

        public int read()
        {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt()
        {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

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

            int res = 0;
            do
            {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }

        public double nextDouble()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.')
            {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.')
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception
    {
        new Thread(null, new Cf131(),"Main",1<<27).start();
    }

    static class Pair{
		int nod;
		int ucn;

		Pair(int nod,int ucn){
			this.nod=nod;
			this.ucn=ucn;
		}

	public static Comparator<Pair> wcompr = new Comparator<Pair>(){
		public int compare(Pair e1,Pair e2){
            //reverse order
			if (e1.ucn < e2.ucn)
                return 1;
            else if (e1.ucn > e2.ucn)
                return -1;
            return 0;
		}
	};
	}

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

    public void run()
    {
        InputReader sc = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        //int t= sc.nextInt();
        //while(t-->0){
            int n = sc.nextInt();
            int m = sc.nextInt();
            int k = sc.nextInt();
            Integer[] a = new Integer[n+1]; a[0] = 0;
            int[][] dp = new int[k+1][n+1]; dp[0][0] = 0;

            for(int i=1;i<=n;i++){  a[i] = a[i-1] + sc.nextInt();   dp[0][i] = 0;  }
            for(int i=1;i<=k;i++)dp[i][0] = 0;

            int ans = Integer.MIN_VALUE;

            for(int i=1;i<=k;i++){
                int j = (i-1)*m + 1;
                int max = Integer.MIN_VALUE;
                for(;j<=(n-m+1);j++){
                    max = Math.max(max,dp[i-1][Math.max(j-m,0)]);
                    dp[i][j] = a[j+m-1]-a[j-1] + max;
                    ans = Math.max(ans,dp[i][j]);
                }
            }

            w.println(ans);

        //}
        w.flush();
        w.close();
    }

}


import java.awt.Point;
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        FastReader sc = new FastReader();
        int n=sc.nextInt(),m=sc.nextInt(),k=sc.nextInt();
        int[] arr=new int[n+1];
        for(int i=1;i<=n;i++)arr[i]=arr[i-1]+sc.nextInt();
        long[][] dp=new long[k+1][n+1];
        for(int i=1;i<=k;i++){
            for(int j=m;j<=n;j++)dp[i][j]=Math.max(dp[i][j-1],dp[i-1][j-m]+arr[j]-arr[j-m]);
        }
        System.out.println(dp[k][n]);
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

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

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}


import java.awt.Point;
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        FastReader sc = new FastReader();
        int n=sc.nextInt(),m=sc.nextInt(),k=sc.nextInt();
        long[] arr=new long[n+1];
        for(int i=1;i<=n;i++)arr[i]=arr[i-1]+sc.nextLong();
        long[][] dp=new long[k+1][n+1];
        for(int i=1;i<=k;i++){
            for(int j=m;j<=n;j++)dp[i][j]=Math.max(dp[i][j-1],dp[i-1][j-m]+arr[j]-arr[j-m]);
        }
        System.out.println(dp[k][n]);
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

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

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}


import java.awt.Point;
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        FastReader sc = new FastReader();
        int n=sc.nextInt(),k=sc.nextInt(),m=sc.nextInt();
        int[] arr=new int[n+1];
        for(int i=1;i<=n;i++)arr[i]=sc.nextInt();
        PriorityQueue<Node> pq=new PriorityQueue<>(new Comparator<Node>() {
            @Override
            public int compare(Node o1, Node o2) {
                return o2.value-o1.value;
            }
        });
        for(int i=2;i<=n;i++)arr[i]+=arr[i-1];
        int l=0,r=k;
        boolean[] vis=new boolean[n+1];
        while(r<=n){
            pq.add(new Node(l,r,arr[r]-arr[l]));
            l++;r++;
        }
        int count=1;
        long sum=0;
        while(count<=m){
            Node node=pq.poll();
            int i=node.i,j=node.j;
            boolean z=true;
            for(int q=i;q<=j;q++){
                if(vis[q]){
                    z=false;
                    break;
                }
            }
            sum=sum+node.value;
            for(int q=i;q<=j;q++)vis[q]=true;
            count++;
        }
        System.out.println(sum);
    }
}
class Node{
    int i,j,value;
    public Node(int i,int j,int value){
        this.i=i;
        this.j=j;
        this.value=value;
    }
}
class FastReader {
    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

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

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class CF467C {
    static BufferedReader __in;
    static PrintWriter __out;
    static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        __in = new BufferedReader(new InputStreamReader(System.in));
        __out = new PrintWriter(new OutputStreamWriter(System.out));

        int n = rni(), m = ni(), k = ni();
        int[] p = ria(n);
        long sum[] = new long[n - m + 1], dp[][] = new long[k + 1][n - m + 1];
        // sliding window sum
        for(int i = 0; i < m; ++i)
            sum[0] += p[i];
        for(int i = 0; i < n - m; ++i) {
            sum[i + 1] = sum[i] + p[i + m] - p[i];
        }

        for(int i = 1; i <= k; ++i) {
            long max = 0;
            for(int j = 0; j <= n - m; ++j) {
                if(j >= m) {
                    max = max(max, dp[i - 1][j - m]);
                }
                dp[i][j] = max + sum[j];
            }
        }
        prln(maxof(dp[k]));

        close();
    }

    // references
    // IBIG = 1e9 + 7
    // IRAND ~= 3e8
    // IMAX ~= 2e10
    // LMAX ~= 9e18
    // constants
    static final int IBIG = 1000000007;
    static final int IRAND = 327859546;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {return x.length == 1 ? x[0] : x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static int minstarting(int offset, int... x) {assert x.length > 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {return x.length == 1 ? x[0] : x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static long minstarting(int offset, long... x) {assert x.length > 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static int maxof(int a, int b, int c) {return max(a, max(b, c));}
    static int maxof(int... x) {return x.length == 1 ? x[0] : x.length == 2 ? max(x[0], x[1]) : max(x[0], maxstarting(1, x));}
    static int maxstarting(int offset, int... x) {assert x.length > 2; return offset == x.length - 2 ? max(x[offset], x[offset + 1]) : max(x[offset], maxstarting(offset + 1, x));}
    static long maxof(long a, long b, long c) {return max(a, max(b, c));}
    static long maxof(long... x) {return x.length == 1 ? x[0] : x.length == 2 ? max(x[0], x[1]) : max(x[0], maxstarting(1, x));}
    static long maxstarting(int offset, long... x) {assert x.length > 2; return offset == x.length - 2 ? max(x[offset], x[offset + 1]) : max(x[offset], maxstarting(offset + 1, x));}
    static int powi(int a, int b) {if(a == 0) return 0; int ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if(a == 0) return 0; long ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int floori(double d) {return (int)d;}
    static int ceili(double d) {return (int)ceil(d);}
    static long floorl(double d) {return (long)d;}
    static long ceill(double d) {return (long)ceil(d);}
    // input
    static void r() throws IOException {input = new StringTokenizer(__in.readLine());}
    static int ri() throws IOException {return Integer.parseInt(__in.readLine());}
    static long rl() throws IOException {return Long.parseLong(__in.readLine());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Integer.parseInt(input.nextToken()); return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Long.parseLong(input.nextToken()); return a;}
    static char[] rcha() throws IOException {return __in.readLine().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static int rni() throws IOException {input = new StringTokenizer(__in.readLine()); return Integer.parseInt(input.nextToken());}
    static int ni() {return Integer.parseInt(input.nextToken());}
    static long rnl() throws IOException {input = new StringTokenizer(__in.readLine()); return Long.parseLong(input.nextToken());}
    static long nl() {return Long.parseLong(input.nextToken());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {__out.println("yes");}
    static void pry() {__out.println("Yes");}
    static void prY() {__out.println("YES");}
    static void prno() {__out.println("no");}
    static void prn() {__out.println("No");}
    static void prN() {__out.println("NO");}
    static void pryesno(boolean b) {__out.println(b ? "yes" : "no");}
    static void pryn(boolean b) {__out.println(b ? "Yes" : "No");}
    static void prYN(boolean b) {__out.println(b ? "YES" : "NO");}
    static void prln(int... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), ++i); __out.println(a[a.length - 1]);}
    static void prln(long... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), ++i); __out.println(a[a.length - 1]);}
    static <T> void prln(Collection<T> c) {int n = c.size() - 1; Iterator<T> iter = c.iterator(); for(int i = 0; i < n; __out.print(iter.next()), __out.print(' '), ++i); __out.println(iter.next());}
    static void flush() {__out.flush();}
    static void close() {__out.close();}}


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

public class George_And_Job {

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		FastReader t = new FastReader();
		PrintWriter o = new PrintWriter(System.out);
		int n = t.nextInt();
		int m = t.nextInt();
		int k = t.nextInt();
		long[] a = new long[n + 1];
		a[0] = 0;

		for (int i = 1; i <= n; ++i)
			a[i] = a[i - 1] + t.nextLong();

		long[][] dp = new long[k + 1][n + 1];

		for (int i = 1; i <= k; ++i) {
			for (int j = 1; j <= n; ++j) {

				if (j - m >= 0) {
					dp[i][j] = a[j] - a[j - m] + dp[i - 1][j - m];
				}

				dp[i][j] = Math.max(dp[i][j], dp[i][j - 1]);
			}
		}

		o.println(dp[k][n]);

		o.flush();
		o.close();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class CF_467C {
    public static void main(String[] args) throws IOException {
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st1 = new StringTokenizer(s.readLine());
        int n = Integer.parseInt(st1.nextToken());
        int m = Integer.parseInt(st1.nextToken());
        int k = Integer.parseInt(st1.nextToken());

        long[] arr = new long[n];
        StringTokenizer st2 = new StringTokenizer(s.readLine());
        for(int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(st2.nextToken());
        }

        long[] comp = new long[n-m+1];
        long sum = 0;
        for(int i = 0; i < m; i++) {
            sum += arr[i];
        }
        comp[0] = sum;
        for(int i = m; i < n; i++) {
            sum += arr[i]-arr[i-m];
            comp[i-m+1] = sum;
        }

        long[][] dp = new long[k][n-m+1];
        long max = comp[0];
        for(int i = 0; i < n-m+1; i++) {
            if(comp[i] > max) max = comp[i];
            dp[0][i] = max;
        }

        for(int i = 1; i < k; i++) {
            for(int j = i*m; j < n-m+1; j++) {
                dp[i][j] = Math.max(dp[i-1][j-m] + comp[j], dp[i][j-1]);
            }
        }

        System.out.println(dp[k-1][n-m]);
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, -1L);
            for (int p = N - M; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p + M >= N)
            return -5000L * 1000000000;
        if (mem[p][k] >= 0)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, -1L);
            for (int p = N; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p == N)
            return -5000L * 1000000000;
        if (mem[p][k] >= 0)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N - M][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, Long.MIN_VALUE);
            for (int p = N - M; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p + M >= N)
            return -5000000000000L;
        if (mem[p][k] > Long.MIN_VALUE)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, -1L);
            for (int p = N; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p + M >= N)
            return -5000L * 1000000000;
        if (mem[p][k] >= 0)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N - M][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, -1);
            for (int p = N - M; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p + M >= N)
            return -5000000000000L;
        if (mem[p][k] >= 0)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


/**
 * @author egaeus
 * @mail sebegaeusprogram@gmail.com
 * @veredict Not sended
 * @url <https://codeforces.com/problemset/problem/467/C>
 * @category ?
 * @date 26/06/2020
 **/

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

import static java.lang.Integer.*;
import static java.lang.Math.*;

public class CF467C {
    static int N, M, K;
    static long[] arr;

    public static void main(String args[]) throws Throwable {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        for (String ln; (ln = in.readLine()) != null && !ln.equals(""); ) {
            StringTokenizer st = new StringTokenizer(ln);
            N = parseInt(st.nextToken());
            M = parseInt(st.nextToken()) - 1;
            K = parseInt(st.nextToken());
            arr = new long[N];
            st = new StringTokenizer(in.readLine());
            for (int i = 0; i < N; i++) {
                arr[i] = parseInt(st.nextToken());
                arr[i] += i > 0 ? arr[i - 1] : 0;
            }
            mem = new long[N - M][K + 1];
            for (long[] a : mem)
                Arrays.fill(a, -1L);
            for (int p = N - M; p >= 0; p--)
                for (int k = 0; k <= K; k++)
                    f(p, k);
            System.out.println(f(0, K));
        }
    }

    static long[][] mem;

    static long f(int p, int k) {
        if (k == 0)
            return 0;
        if (p + M >= N)
            return -5000L * 1000000000;
        if (mem[p][k] >= 0)
            return mem[p][k];
        long s = 0;
        if (p + M < N)
            s = f(p + M + 1, k - 1) + arr[p + M] - (p > 0 ? arr[p - 1] : 0);
        s = Math.max(s, f(p + 1, k));
        return mem[p][k] = s;
    }
}


import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
//int T=s.nextInt();
//while(T-->0){
long sum=0L;
  n=s.nextInt(); m=s.nextInt(); k=s.nextInt();int[] a=new int[n];
a[0]=s.nextInt();
dp=new long[n];
dp[0]=a[0];
 for(int i=1;i<n;i++){
  a[i]=s.nextInt();sum+=a[i];dp[i]=dp[i-1]+a[i];
 }int[] b=a.clone();
// Arrays.sort(b);//HashMap<Integer,Integer> h=new HashMap<Integer,Integer>();
vis=new boolean[n][m*k+1];
ans=new long[n][m*k+1];
//System.out.println(dp[5]+" "+dp[3]);
 System.out.println(go(0,0L,m-1));

}
static long[][] ans;static boolean[] [] vis;static int m,k,n;
static long[] dp;
public static long go(int c,long val,int i){
 //  System.out.println(val+" "+c+" "+i);

   if(c>m*k) return 0;
   if(i>=n) return val;
   if(vis[i][c]==true) {return val+ans[i][c];}vis[i][c]=true;
   if(m>i) ans[i][c]=val+Math.max(go(c+m,dp[i],i+m),go(c,0,i+1));
   else ans[i][c]=val+Math.max(go(c+m,dp[i]-dp[i-m],i+m),go(c,0,i+1));
    return ans[i][c];

}
}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class ladders467c {
    static BufferedReader __in;
    static PrintWriter __out;
    static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        __in = new BufferedReader(new InputStreamReader(System.in));
        __out = new PrintWriter(new OutputStreamWriter(System.out));

        r();
        int n = ni(), m = ni(), k = ni(), a[] = ria(n);
        k = n - k * m;
        // dp[up to][# used - 1]
        long[][] dp = new long[n + 1][k + 1];
        for(long[] l : dp) {
            fill(l, LMAX - IBIG);
        }
        for(int i = 0; i <= n; ++i) {
            dp[i][0] = 0;
        }
        // either 1 apart or m apart
        for(int i = 1; i <= n; ++i) {
            if(i <= m) {
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = dp[i - 1][j - 1] + a[i - 1];
                }
            } else {
                // continue / jump
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = min(dp[i - 1][j - 1] + a[i - 1],  dp[i - m - 1][j - 1] + a[i - 1]);
                }
            }
        }
        long sum = 0;
        for(int i : a) {
            sum += i;
        }
        long min = LMAX;
        for(int i = 1; i <= n; ++i) {
            min = min(min, dp[i][k]);
        }
        prln(sum - min);

        close();
    }

    // references
    // IBIG = 1e9 + 7
    // IRAND ~= 3e8
    // IMAX ~= 2e10
    // LMAX ~= 9e18
    // constants
    static final int IBIG = 1000000007;
    static final int IRAND = 327859546;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static int minstarting(int offset, int... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static long minstarting(int offset, long... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static int powi(int a, int b) {if(a == 0) return 0; int ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if(a == 0) return 0; long ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int floori(double d) {return (int)d;}
    static int ceili(double d) {return (int)ceil(d);}
    static long floorl(double d) {return (long)d;}
    static long ceill(double d) {return (long)ceil(d);}
    // input
    static void r() throws IOException {input = new StringTokenizer(__in.readLine());}
    static int ri() throws IOException {return Integer.parseInt(__in.readLine());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Integer.parseInt(input.nextToken()); return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Long.parseLong(input.nextToken()); return a;}
    static char[] rcha() throws IOException {return __in.readLine().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static int ni() {return Integer.parseInt(input.nextToken());}
    static long nl() {return Long.parseLong(input.nextToken());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {__out.println("yes");}
    static void pry() {__out.println("Yes");}
    static void prY() {__out.println("YES");}
    static void prno() {__out.println("no");}
    static void prn() {__out.println("No");}
    static void prN() {__out.println("NO");}
    static void pryesno(boolean b) {__out.println(b ? "yes" : "no");};
    static void pryn(boolean b) {__out.println(b ? "Yes" : "No");}
    static void prYN(boolean b) {__out.println(b ? "YES" : "NO");}
    static void prln(int... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void prln(long... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void flush() {__out.flush();}
    static void close() {__out.close();}
    // debug
    static void debug(String desc, int... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
    static void debug(String desc, long... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class ladders467c {
    static BufferedReader __in;
    static PrintWriter __out;
    static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        __in = new BufferedReader(new InputStreamReader(System.in));
        __out = new PrintWriter(new OutputStreamWriter(System.out));

        r();
        int n = ni(), m = ni(), k = ni(), a[] = ria(n);
        k = n - k * m;
        // dp[up to][# used - 1]
        long[][] dp = new long[n + 1][k + 1];
        for(long[] l : dp) {
            fill(l, LBIG);
        }
        for(int i = 0; i <= n; ++i) {
            dp[i][0] = 0;
        }
        // either 1 apart or m apart
        for(int i = 1; i <= n; ++i) {
            if(i <= m) {
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = dp[i - 1][j - 1] + a[i - 1];
                }
            } else {
                // continue / jump
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = dp[i - 1][j - 1];
                    int i_ = i;
                    while(i_ > m) {
                        dp[i][j] = min(dp[i][j], dp[(i_ -= m) - 1][j - 1]);
                    }
                    dp[i][j] += a[i - 1];
                }
            }
        }
        long sum = 0;
        for(int i : a) {
            sum += i;
        }
        long min = LMAX;
        for(int i = 1; i <= n; ++i) {
            min = min(min, dp[i][k]);
            // prln(min);
        }
        prln(sum - min);

        close();
    }

    // references
    // IBIG = 1e9 + 7
    // IRAND ~= 3e8
    // IMAX ~= 2e10
    // LMAX ~= 9e18
    // constants
    static final int IBIG = 1000000007;
    static final int IRAND = 327859546;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LBIG = 4000000000000000009L;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static int minstarting(int offset, int... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static long minstarting(int offset, long... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static int powi(int a, int b) {if(a == 0) return 0; int ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if(a == 0) return 0; long ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int floori(double d) {return (int)d;}
    static int ceili(double d) {return (int)ceil(d);}
    static long floorl(double d) {return (long)d;}
    static long ceill(double d) {return (long)ceil(d);}
    // input
    static void r() throws IOException {input = new StringTokenizer(__in.readLine());}
    static int ri() throws IOException {return Integer.parseInt(__in.readLine());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Integer.parseInt(input.nextToken()); return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Long.parseLong(input.nextToken()); return a;}
    static char[] rcha() throws IOException {return __in.readLine().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static int ni() {return Integer.parseInt(input.nextToken());}
    static long nl() {return Long.parseLong(input.nextToken());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {__out.println("yes");}
    static void pry() {__out.println("Yes");}
    static void prY() {__out.println("YES");}
    static void prno() {__out.println("no");}
    static void prn() {__out.println("No");}
    static void prN() {__out.println("NO");}
    static void pryesno(boolean b) {__out.println(b ? "yes" : "no");};
    static void pryn(boolean b) {__out.println(b ? "Yes" : "No");}
    static void prYN(boolean b) {__out.println(b ? "YES" : "NO");}
    static void prln(int... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void prln(long... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void flush() {__out.flush();}
    static void close() {__out.close();}
    // debug
    static void debug(String desc, int... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
    static void debug(String desc, long... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
}


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

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class ladders467c {
    static BufferedReader __in;
    static PrintWriter __out;
    static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        __in = new BufferedReader(new InputStreamReader(System.in));
        __out = new PrintWriter(new OutputStreamWriter(System.out));

        r();
        int n = ni(), m = ni(), k = ni(), a[] = ria(n);
        k = n - k * m;
        // dp[up to][# used - 1]
        long[][] dp = new long[n + 1][k + 1];
        for(long[] l : dp) {
            fill(l, IBIG);
        }
        for(int i = 0; i <= n; ++i) {
            dp[i][0] = 0;
        }
        // either 1 apart or m apart
        for(int i = 1; i <= n; ++i) {
            if(i <= m) {
                // use/not use
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = min(dp[i - 1][j - 1] + a[i - 1], dp[i - 1][j]);
                }
            } else {
                // use/not use
                for(int j = 1; j <= k; ++j) {
                    dp[i][j] = minof(dp[i - 1][j - 1] + a[i - 1],  dp[i - m - 1][j - 1] + a[i - 1], dp[i - 1][j]);
                }
            }
        }
        long sum = 0;
        for(int i : a) {
            sum += i;
        }
        // prln(k);
        prln(sum - dp[n][k]);

        close();
    }

    // references
    // IBIG = 1e9 + 7
    // IRAND ~= 3e8
    // IMAX ~= 2e10
    // LMAX ~= 9e18
    // constants
    static final int IBIG = 1000000007;
    static final int IRAND = 327859546;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static int minstarting(int offset, int... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {assert x.length >= 2; return x.length == 2 ? min(x[0], x[1]) : min(x[0], minstarting(1, x));}
    static long minstarting(int offset, long... x) {assert x.length >= 2; return offset == x.length - 2 ? min(x[offset], x[offset + 1]) : min(x[offset], minstarting(offset + 1, x));}
    static int powi(int a, int b) {if(a == 0) return 0; int ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if(a == 0) return 0; long ans = 1; while(b > 0) {if((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int floori(double d) {return (int)d;}
    static int ceili(double d) {return (int)ceil(d);}
    static long floorl(double d) {return (long)d;}
    static long ceill(double d) {return (long)ceil(d);}
    // input
    static void r() throws IOException {input = new StringTokenizer(__in.readLine());}
    static int ri() throws IOException {return Integer.parseInt(__in.readLine());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Integer.parseInt(input.nextToken()); return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; input = new StringTokenizer(__in.readLine()); for(int i = 0; i < n; ++i) a[i] = Long.parseLong(input.nextToken()); return a;}
    static char[] rcha() throws IOException {return __in.readLine().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static int ni() {return Integer.parseInt(input.nextToken());}
    static long nl() {return Long.parseLong(input.nextToken());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {__out.println("yes");}
    static void pry() {__out.println("Yes");}
    static void prY() {__out.println("YES");}
    static void prno() {__out.println("no");}
    static void prn() {__out.println("No");}
    static void prN() {__out.println("NO");}
    static void pryesno(boolean b) {__out.println(b ? "yes" : "no");};
    static void pryn(boolean b) {__out.println(b ? "Yes" : "No");}
    static void prYN(boolean b) {__out.println(b ? "YES" : "NO");}
    static void prln(int... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void prln(long... a) {for(int i = 0, len = a.length - 1; i < len; __out.print(a[i]), __out.print(' '), i++); __out.println(a[a.length - 1]);}
    static void flush() {__out.flush();}
    static void close() {__out.close();}
    // debug
    static void debug(String desc, int... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
    static void debug(String desc, long... a) {System.out.print(desc); System.out.print(": "); for(int i = 0, len = a.length - 1; i < len; System.out.print(a[i]), System.out.print(", "), i++); System.out.println(a[a.length - 1]);}
}