jiahuimbzuai/CoQuIR huggingface dataset:
//  [python]
# coding:utf-8

import sys
# from collections import Counter, defaultdict

INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


a, b, c = LI()
print(min(b // a, c))
//  [python]
A,B,C = map(int,input().split())
print(min(B//A,C))
//  [python]
A,B,C=(int(i) for i in input().split())
if A*C<=B:
  print(C)
else:
  print(int(B/A))
//  [python]
a, b, c = map(int, input().split())
print(min(c, b//a))
//  [python]
a,b,c = map(int, raw_input().split(' '))
print min(c, b/a)
//  [python]
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import numpy as np
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right
def inpl(): return list(map(int, input().split()))

A, B, C = map(int,input().split())

if B/A>=C:
    print(C)
else:
    print(B//A)
//  [java]
import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
	}

	public static void solution(String[] args) throws Exception{

		int A = nextInt();
		int B = nextInt();
		int C = nextInt();


		System.out.println(Math.min(C, B/A));

	}
	public static String[] toStringArray(String s) {
		String[] tmp = new String[s.length()];
		char[] c = s.toCharArray();
		for (int i = 0; i < tmp.length; i++) {
			tmp[i] = String.valueOf(c[i]);
		}
		return tmp;
	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();

		if(B>=A*C)
			System.out.println(C);
		else
			System.out.println(B/A);
	}
	//以下、自作ライブラリ

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}
}

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

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

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

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

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

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

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

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}
//  [java]
import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {


        public void solve(int testNumber, InputReader in, PrintWriter out) {


            int[] a = Arrays.stream(in.nextLine().split(" ")).mapToInt(Integer::valueOf).toArray();

            out.println(Math.min(a[1] / a[0], a[2]));

        }

    }


    static class InputReader implements AutoCloseable {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            //reader = new BufferedReader(new FileReader(stream), 32768);
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return "";
        }

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

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

        public void close() {
        }

    }
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int answer = Math.min(B/A, C);
        System.out.println(answer);
    }
}
//  [java]
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();

        if (a * c < b) {
            System.out.println(c);
        } else {
            System.out.println(b / a);
        }
    }
}
//  [cpp]
#include<stdio.h>
#include<string.h>
int main()
{
    int a,b,c,s;
    scanf("%d%d%d",&a,&b,&c);
    int x=b/a;
    if(x>=c)
        printf("%d\n",c);
    else
        printf("%d\n",x);
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF LLONG_MAX/3
#define eps LDBL_EPSILON
#define moder 1000000007
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
using namespace std;
signed main(){
	int a,b,c;
	cin>>a>>b>>c;
	cout<<min(c,b/a)<<endl;
	return 0;
}
//  [cpp]
#include <iostream>

using namespace std;

int main(void){
    int a, b, c;
    cin >> a >> b >> c;
    
    int canDrink = b / a;
    cout << min(canDrink, c) << endl;
    return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    int max = a * c;
    if (b >= max){
        cout << c << endl;
    }
    else{
      	int num1;
        num1 = (b - (b % a)) / a;
        cout << num1 << endl;
    }        
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using ul = unsigned long;

template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

const int mod=1e9+7;

struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};

mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}

map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}

void printv(vi& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
void printv(vll& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
int vtotal(vi& v){
  int total=0;
  rep(i,v.size()) total+=v[i];
  return total;
}

int main()
{
  //init(); // mint初期化
  cin.tie( 0 );
  ios::sync_with_stdio( false );

  int a,b,c;cin>>a>>b>>c;
  int ans=0;
  if(b/a>c)ans=c;
  else ans=b/a;

  cout<<ans<<endl;

  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
 
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using ul = unsigned long;
 
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
 
const int mod=1e9+7;
 
struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};
 
mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}
 
bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
 
    return true;
}
 
map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}
 
void printv(vi& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
void printv(vll& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
int vtotal(vi& v){
  int total=0;
  rep(i,v.size()) total+=v[i];
  return total;
}
 
int main()
{
  //init(); // mint初期化
  cin.tie( 0 );
  ios::sync_with_stdio( false );
 
  int a,b,c;cin>>a>>b>>c;
  int ans=0;
  if(b/a>c)ans=c;
  else ans=b/a;
 
  cout<<ans<<endl;
 
  return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int a,b,c,more,n;
	scanf("%d %d %d",&a,&b,&c);
	more = b / a;
	if (a >= 1 && b >= 1 && c >= 1 && a <= 100 && b <= 100 && c <= 100)
	{
		goto ass;
	}
	else { return 0; }
	ass : if (more > c)
	{
		printf("%d", c);

	}
	else
	{
		printf("%d", more);
	}
}
//  [c]
#include <stdio.h>
int main(int argc, char const *argv[])
{
	int A,B,C;
	scanf("%d %d %d",&A,&B,&C);
	if(A * C <= B){
		printf("%d\n", C);
	}else{
		printf("%d\n",B / A);
	}
	return 0;
}
//  [c]
#include<stdio.h>

int main(void)
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(b/a>c)
		printf("%d",c);
	else
		printf("%d",b/a);
	return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    if(b / a >= c){
        printf("%d", c);
    }else{
        printf("%d", b / a);
    }
}
//  [c]
#include <stdio.h>
int a,b,c,ans;
int main() {
 scanf("%d %d %d",&a,&b,&c);
 ans=b/a;
 if(ans>c)
  {printf("%d",c);} 
 else
  {printf("%d",ans);}
  
  
  
  
  
  
  
  return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  if(b / a > c){
    printf("%d\n", c);
  }else{
    printf("%d\n", b / a);
  }
  return 0;
}
//  [javascript]
"use strict";
const main = input => {
    const a = Number(input[0].split(' ')[0]);
    const b = Number(input[0].split(' ')[1]);
    const c = Number(input[0].split(' ')[2]);
    console.log(Math.floor(b/a)>c?c:Math.floor(b/a));
    
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
//  [javascript]
"use strict";

function Main(input) {
	input = input.split(" ");
    const a = parseInt(input[0], 10);
    let b = parseInt(input[1], 10);
    const c = parseInt(input[2], 10);

    let answer = 0;
    for (let i = 0; i < c; i++) {
        if (a > b) {
            break;
        } else {
            answer++;
            b -= a;
        }
    }

    console.log(answer);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
    var inputs = input.split("\n");
    var ABC = inputs.shift().split(" ");
    var A = ABC.shift();
    var B = ABC.shift();
    var C = ABC.shift();
    console.log(Math.min(C, Math.floor(B / A)))
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict"
function Main(input){
 input=input.trim();
 input=input.split(/\s+/);
 for(let i=0;i<input.length;i++)
   input[i]=input[i]-0;
  var A=input[0];
  var B=input[1];
  var C=input[2];
  var M=Math.floor(B/A);
  var result=Math.min(M,C);
  console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));
//  [javascript]
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r=n(1);n(2)(r.readFileSync("/dev/stdin","utf8"))},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";var r=n(3),i=n(5);t.exports=function(t){var e=new r(t);i(e)}},function(t,e,n){"use strict";var r=n(4);t.exports=class{constructor(t){var e=t.trim().split(/\s+/g);this.inp=new r(e)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(t,e,n){"use strict";t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=t.length,this.items=t,this.ind=0}enq(t){this.size+=1,this.items.push(t)}deq(){var t=this.items[this.ind];return this.size-=1,this.ind+=1,t}clear(){this.items=[],this.size=0,this.ind=0}}},function(t,e,n){"use strict";t.exports=function(t){var e=t.in(),n=t.in(),r=t.in(),i=Math.floor(n/e),s=Math.min(i,r);console.log(s)}}]);
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
  input = input.split("\n")
  tmp0 = input[0].split(" ")
  A = Number(tmp0[0])
  B = Number(tmp0[1])
  C = Number(tmp0[2])

  console.log(Math.min(Math.floor(B/A), C))

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main("100 1 10\n")
//  [go]
package main

import (
  "fmt"
)

func maxInt(a ...int) int {m := a[0]; for _, x := range a {if x > m {m = x}}; return m}
func minInt(a ...int) int {m := a[0]; for _, x := range a {if x < m {m = x}}; return m}

func main() {
  var a, b, c int
  fmt.Scan(&a, &b, &c)
  fmt.Println(minInt(b/a, c))
}
//  [go]
package main

import "fmt"

func main() {
	var a, b, c int
	fmt.Scan(&a, &b, &c)

	if b/a > c {
		fmt.Println(c)
	} else {
		fmt.Println(b / a)
	}
}
//  [go]
package main

import (
	"fmt"
	"math"
)

func main() {

	var A, B, C int
	fmt.Scan(&A, &B, &C)
	fmt.Println(math.Min(float64(B/A), float64(C)))
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func Scanner() string {
	sc.Scan()
	return sc.Text()
}

func intScanner() int {
	n, _ := strconv.Atoi(Scanner())
	return n
}

func floatScanner() float64 {
	n, _ := strconv.ParseFloat(Scanner(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func stringSliceScanner(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scanner()
	}
	return a
}
func intSliceScanner(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = intScanner()
	}
	return a
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}

var mod int

func main() {
	mod = 1000000007
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	a, b, c := intScanner(), intScanner(), intScanner()
	fmt.Println(smaller(b/a, c))
}
//  [ruby]
a,b,c=gets.split.map &:to_i
puts [b/a,c].min
//  [ruby]
sound,money,satis_times = gets.split(" ").map!{|i| i.to_i}
cut = money % sound
max_time = (money - cut) / sound

if max_time > satis_times
  puts satis_times
else 
  puts max_time
end
//  [ruby]
inputs = STDIN.gets.chomp.split(' ').map(&:to_i)

time = inputs[1] / inputs[0]

if time > inputs[2]
  puts inputs[2]
else
  puts time
end
//  [ruby]
a, b , c = gets.chomp.split(" ").map(&:to_i)
ans = b / a
puts ans > c ? c : ans
//  [ruby]
a,b,c = gets.chomp.split(' ').map(&:to_i)
if b/a >= c
  puts c
else
  puts b/a
end
//  [ruby]
A, B, C = gets.chomp.split(' ').map(&:to_i)
puts [C, B/A].min
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input!(a: usize, b: usize, c: usize);

    let count = std::cmp::min(b / a, c);

    println!("{}", count);
}
//  [rust]
use std::io;
use std::cmp::min;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let a = v[0];
	let b = v[1];
	let c = v[2];
	let mut cnt = min(b/a, c);
	println!("{}", cnt);
}
//  [rust]
#![allow(dead_code, unused_variables, unused_macros, unused_imports)]

// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes .by_ref() .map(|r|r.unwrap() as char) .skip_while(|c|c.is_whitespace()) .take_while(|c|!c.is_whitespace()) .collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($next, $t); input_inner!{$next $($r)*} }; }
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

fn main() {
    input! {
        a: i32,
        b: i32,
        c: i32,
    }

    println!("{}", std::cmp::min(c, b / a));
}
//  [rust]
use proconio::{fastout, input};
#[allow(unused_mut)]
#[fastout]
fn main() {
    input! {
        a: usize,
        b: usize,
        c: usize
    }
    let res = if b / a < c { b / a } else { c };
    println!("{}", res);
}
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]
#![allow(dead_code)]
 
use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;
use num::*;
use num_traits::*;
use superslice::*;
use std::ops::*;
 
use itertools::Itertools;
use itertools_num::ItertoolsNum;

#[fastout]
fn solve() {
    const MOD: usize = 1_000_000_007;
    const INF: usize = std::usize::MAX;

    input!{
        a: usize, b: usize, c: usize,
    }

    let ans = if b / a < c { b / a } else { c };
    println!("{}", ans)
}

fn main() {
    solve();
}
//  [rust]
use proconio::{input, fastout};
use std::cmp::*;
#[fastout]
fn main() {
    input!{
        a: usize,
        b: usize,
        c: usize,
    }

    println!("{}", min(b/a, c));

}
//  [swift]
let arr = readLine()!.characters.split{$0 == " "}.map{Int(String($0))!}
let a = arr[0]
let b = arr[1]
let c = arr[2]
print(min(c,b/a))
//  [swift]
import Foundation

extension String {
    func split(separator: String) -> [Int] {
        return self.componentsSeparatedByString(separator).map { Int($0)! }
    }
}

let input = readLine()!.split(" ")
let A = input[0]
let B = input[1]
let C = input[2]

var ans: Int!
ans = B / A
if ans > C {
    ans = C
}

print(ans)
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let A = xs[0];
   let B = xs[1];
   let C = xs[2];
   let ans = Math.floor(B/A);
  
   if(C<=ans){
      console.log(C);
   }else{
      console.log(ans);
   }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [typescript]
function main(input) {
  input = input.trim();
  const [a, b, c] = input.split(' ').map(n => Number(n));
  const cnt = Math.floor(b/a);
  const result = Math.min(c, cnt);
  console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const fs = require('fs')
const stdin = fs.readFileSync('/dev/stdin', 'utf8')

const [A, B, C] = stdin.split('\n')[0].split(' ').map(Number)

const res = Math.floor(B/A) > C ? C : Math.floor(B/A)

console.log(res)
//  [typescript]
namespace Coder {
  class Scanner {
    private buffer: string = '';
    private stdinQueue: any = [];

    constructor() {
      process.stdin.resume();
      process.stdin.setEncoding('utf8');
      process.stdin.on(
        'data',
        (chunk): void => {
          this.buffer += chunk;
          while (this.stdinQueue.length > 0) {
            const i = this.buffer.indexOf('\n');
            if (i < 0) {
              break;
            }
            let line = this.buffer.substr(0, i);
            if (line.endsWith('\r')) {
              line = line.slice(0, -1);
            }
            this.buffer = this.buffer.substr(i + 1);
            this.stdinQueue.shift()(line);
          }
        },
      );
    }
    public getLine(): Promise<string> {
      return new Promise((resolve, reject) => {
        const i = this.buffer.indexOf('\n');
        if (i >= 0 && this.stdinQueue.length === 0) {
          let line = this.buffer.substr(0, i);
          if (line.endsWith('\r')) {
            line = line.slice(0, -1);
          }
          this.buffer = this.buffer.substr(i + 1);
          resolve(line);
        } else {
          this.stdinQueue.push(resolve);
        }
      });
    }

    public close(): void {
      process.stdin.pause();
    }
  }
  async function solve() {
    const sc = new Scanner();
    const [A, B, C]: number[] = (await sc.getLine()).split(' ').map((x) => +x);
    const t: number = Math.floor(B / A);
    if (t >= C) {
      console.log(C);
    } else {
      console.log(t);
    }
    sc.close();
  }

  solve();
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result}

const main = ()=>{
  let [a,b,c] = [...nrin(3)];
  out(min(floor(b/a), c));
}
main();
//  [typescript]
"use strict"
let fs = require('fs');
let input = fs.readFileSync("/dev/stdin", "utf8").split(/\s/);

let args: number[] = input.map(mp => +mp);
let current = args[1];
let ans = 0;

for(let i=0; i<args[2]; i++) {
  if( current >= args[0] ) {
    current -= args[0];
    ans++;
  } else {
    break;
  }
}

console.log(ans);
//  [python]
import numpy as np
N = int(input())
A1 = np.array([int(a) for a in input().split()])
A2 = np.array([int(a) for a in input().split()])

max_candy = 0
for i in range(N):
    candy = sum(A1[:(i+1)]) + sum(A2[i:])
    if candy > max_candy:
        max_candy = candy

print(max_candy)
//  [python]
import numpy as np

n = int(input())
a1 = list(map(int, input().split(" ")))
a2 = list(map(int, input().split(" ")))

if(n == 1):
   max = sum(a1) + sum(a2)
   print(max)
   exit()

max = 0
for i in range(n):

    num = sum(a1[:i]) + sum(a2[(i-1):])
    if(max < num):
        max = num

print(max)
//  [python]
import sys
import numpy as np
n = int(sys.stdin.readline())
a1 = list(map(int, sys.stdin.readline().split()))
a2 = list(map(int, sys.stdin.readline().split()))
maxc, maxi = 0, 0
for i in range(n+1):
    s = np.sum(a1[:i+1])+np.sum(a2[i:])
    if s > maxc:
        maxc, maxi = s, i
print(maxc)
//  [java]
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] f1 = new int[n];
		int[] f2 = new int[n];
		for (int i = 0; i < n; i++) {
			f1[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			f2[i] = sc.nextInt();
		}
		Arrays.parallelPrefix(f1, Integer::sum);
		Arrays.parallelPrefix(f2, Integer::sum);
		int[] nums = new int[n];
		int a = f1[0];
		a += f2[n-1];
		nums[0] = a;
		for(int i = 1; i < n; i++) {
			int profit = f1[i];
			profit += (-f2[i-1] + f2[n-1]);
			nums[i] = profit;
		}
		System.out.println(Arrays.stream(nums).max().getAsInt());
	}
}
//  [java]
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	private static int n;

	public static void main(String[] args) {

		Main main = new Main();

		List<Integer> list = new ArrayList<>();
		int[][] arr = main.scan();
		int candies = 0;

		int f = 0;
		for (int i = 0; i < n; i++) {
			f += arr[0][i];
			for (int j = i; j < n; j++) {
				candies += arr[1][j];
			}
			list.add(f + candies);
			candies = 0;
		}

		System.out.println(list.stream().sorted((v1, v2) -> v2 - v1).findFirst().get());
	}

	private int[][] scan() {

		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		int[][] arr = new int[2][n];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		sc.close();
		return arr;
	}
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000009
#define ll long long
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define set0(a) memset ((a), 0 , sizeof(a))
#define set1(a) memset((a),-1,sizeof (a))
#define pi pair<int, int>
#define ps pair<string, string>
#define pl pair<long, long>
#define pll pair<long long, long long>
#define vll vector<long long>
#define vl vector<long>
#define vi vector<int>
#define vs vector<string>
#define vps vector< ps >
#define vpi vector< pi >
#define vpl vector< pl >
#define vpll vector< pll >
#define flash  ios_base::sync_with_stdio(false); cin.tie(NULL);
#define tc(t,T) for(long long t=0;t<T;t++)
#define rep(i,s,n,d) for(long long i=s;i<n;i=i+d)

bool sortbysec(const pll &a,
              const pll &b)
{
    return (a.second < b.second);
}
/*bool cxp pair<ll, pll> &a,
              const pair<ll, pll> &b)
{
    return (a.ff < b.ff);
}*/

void func(void)
{
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
}
ll gcd(ll a,ll b){
    if(b==0)return a;
    else return gcd(b,a%b);
}
void printStack(stack<string> s){
    if(s.empty())return;

    string x=s.top();
    s.pop();
    printStack(s);
    cout<<x;
    s.push(x);

}


ll binaryexp(ll n,ll p){

    if(p==0) return 1;
    if(p%2==0) return binaryexp((n%mod)*(n%mod),p/2);
    else return ((n%mod)*binaryexp(((n%mod)*(n%mod))%mod,(p-1)/2)%mod);

}

#define meax 10000001
vll spf(meax,0);
void siv(){
    spf[1]=1;

   for(ll i=2;i<meax;i++)spf[i]=i;

   for(ll i=4;i<meax;i+=2){
        spf[i]=2;
    }
    for(ll i=3;i*i<meax;i++){
        if(spf[i]==i){
            for(ll j=i*i;j<meax;j+=i){
                if(spf[j]==j){
                    spf[j]=i;
                }
            }
        }
    }
}
ll dp[2][10001]={};
 ll a[2][10001];
    ll dcx(ll i,ll j,ll n){


     if(i>=2 || j>=n)return 0;
     if(dp[i][j]!=0)return dp[i][j];
     if(i==n-1 && j==1){
            dp[i][j]=a[i][j];
            return a[i][j];
     }
     ll d1=dcx(i+1,j,n);
     ll d2=dcx(i,j+1,n);
     dp[i][j]=a[i][j]+max(d1,d2);
     return dp[i][j];
    }
int main(){
        ll n;
        cin>>n;

        rep(i,0,n,1){
            cin>>a[0][i];
        }
         rep(i,0,n,1){
            cin>>a[1][i];
        }
        cout<<dcx(0,0,n)<<endl;

}
//  [cpp]
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include <iomanip>
using namespace std;

int main(){
	int n,sum=0,ans=0;
	cin>>n;
   
    vector<long long int>a(10000000);
    vector<long long int>b(10000000);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=0;i<n;i++){
        cin>>b[i];
    }
    for(int i=0;i<n;i++){
    	for(int j=0;j<n;j++){
    		if(i>j){
    			sum+=a[j];
    		}
    		else if(i==j){
    			sum+=a[j]+b[j];
    		}
    		else{
    			sum+=b[j];
    		}
    	}
    	if(ans<sum){
    		ans=sum;
    	}
    	sum=0;
    }
    cout<<ans<<endl;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define mod 1000000007

bool vis[200005];
vector<int> vec[2000005], v1;
int child[2000005];
int parent[2000005];
int div1[100005];
int min_indx[200005];
int count1 = 0;
int height = 0;
int max_indx[200005];
void dfs(int node)
{

    vis[node] = 1;

    min_indx[count1] = node;
    max_indx[node] = min(max_indx[node], count1);
    count1++;

    //  count1++;
    child[node] = height++;
    for (int i = 0; i < vec[node].size(); i++)
    {
        if (!vis[vec[node][i]])
        {
            dfs(vec[node][i]);
            min_indx[count1] = node;
            max_indx[node] = min(max_indx[node], count1);
            count1++;
        }
    }
    height--;
}
int MAXN = 200005;
int LOGMAXN = (int)log2(200005) + 1;
int M[200005][60];
int ans[200005];
void fun(int a, int b, int c)
{
    //ll val = 1;

    while (a <= b)
    {
        ans[a] += c;
        int p = -a;
        a += (a & p);
    }
}
int find1(int a)
{
    int sum = 0;
    while (a != 0)
    {
        sum += ans[a];
        int p = -a;
        a -= (a & p);
    }
    return sum;
}
void process2(int A[], int N)
{
    int i, j;

    for (i = 0; i < N; i++)
        M[i][0] = i;
    for (j = 1; 1 << j <= N; j++)
        for (i = 0; i + (1 << j) - 1 < N; i++)
            if (find1(M[i][j - 1]) < find1(M[i + (1 << (j - 1))][j - 1]))
                M[i][j] = M[i][j - 1];
            else
                M[i][j] = M[i + (1 << (j - 1))][j - 1];
}

int32_t main()
{
    int n;
    cin >> n;
    int arr1[n], arr2[n];
    for (int i = 0; i < n; i++)
    {
        cin >> arr1[i];
    }
    for (int i = 0; i < n; i++)
    {
        cin >> arr2[i];
    }
    int sum1[n], sum2[n];
    sum1[0] = arr1[0];
    sum2[0] = arr2[0];
    for (int i = 1; i < n; i++)
    {
        sum1[i] = sum1[i - 1] + arr1[i];
        sum2[i] = sum2[i - 1] + arr2[i];
    }
    int max1 = 0;
    for (int i = 0; i < n; i++)
    {
        if (sum1[i] - sum2[i] + sum2[n - 1] + arr2[i] > max1)
        {
            max1 = sum1[i] - sum2[i] + sum2[n - 1] + arr2[i];
        }
        //   cout << max1 << "\n";
    }
    cout << max1 << "\n";

    return 0;
}
//  [c]
#include <stdio.h>
int main () {
  int n, i;
  scanf ("%d", &n);
  int a[2][100];
  int sum1[100];
  int sum2[100];
  int temp = 0;
  for (i = 0; i < n; ++i) {
    scanf ("%d", &a[0][i]);
    temp += a[0][i];
    sum1[i] = temp;
  }
  temp = 0;
  for (i = 0; i < n; ++i) {
    scanf ("%d", &a[1][i]);
    temp += a[1][i];
    sum2[i] = temp;
  }
  int max = 0;
  for (i = 0; i < n; ++i) {
    temp = sum1[i] + sum2[n-1] - sum2[i] + a[1][i];
    if (temp > max) {
      max = temp;
    }
  }
  printf ("%d\n", max);
  return 0;
}
//  [c]
#include<stdio.h>
int main(){
  int A[2][101]={},i,j,n,t=0;
  scanf("%d",&n);
  for(i=0;i<2;i++)for(j=1;j<=n;j++){scanf("%d",&A[i][j]);A[i][j]+=A[i][j-1];}
  for(i=1;i<=n;i++){j=A[0][i]+A[1][n]-A[1][i-1];t=j<t?t:j;}
  printf("%d",t);
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    int N;

    scanf("%d", &N);

    int A[2][N];

    for(int i = 0; i < 2; i++){
        for(int j = 0; j < N; j++){
            scanf("%d", &A[i][j]);
        }
    }

    int max = 0;

    for(int i = 0; i < N; i++){
        int c = 0;
        for(int j = 0; j <= i; j++){
            c += A[0][j];
        }
        for(int j = i; j < N; j++){
            c += A[1][j];
        }
        if(c > max){
            max = c;
        }
    }

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

    return 0;
}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {

  var inp = input.split('\n');
  var N = inp[0];
  var tmp = inp[1].split(' ');
  var tmp2 = inp[2].split(' ');
  var A = new Array;
  A[0] = new Array;
  A[1] = new Array;

  // console.log(tmp2);


  for (var i = 0; i < 2; i++) {
    for (var j = 0; j < N; j++) {
      if (i === 0) {
        A[i][j] = parseInt(tmp[j]);
      } else if (i === 1) {
        A[i][j] = parseInt(tmp2[j]);
      }
    }
  }
  // console.log(A);
  var maxVal = 0;
  var tmp = 0;
  for(var tmp = 0; tmp <= N - 1; tmp++) {
    var sum = 0;
    for (var l = 0; l <= N - 1 - tmp; l++) {
      sum += A[0][l];
    }
    for (var m = N - 1 - tmp; m <= N - 1; m++) {
      sum += A[1][m];
    }
    if (sum > maxVal) maxVal = sum;
    // console.log(maxVal);
  }
  console.log('%d', maxVal);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var lines = [];
var N, A;

var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});

rl.on('line', function (x) {
    lines.push(x);
});

rl.on('close', function () {
    N = Number(lines[0]); lines.shift();
    A = lines.map(i => i.split(" ").map(i => Number(i)));

    var q = [[0, 0, 0]];
    console.log(bfs(q));

});

function bfs(q) {
    var ans = 0, counter = 0;

    while (q.length) {
        var t = q.shift();
        var y = t[0], x = t[1]; counter = t[2] + A[y][x];

        ans = Math.max(ans, counter)

        if (x + 1 < N) { q.push([y, x + 1, counter]) }
        if (y + 1 < 2) { q.push([y + 1, x, counter]) }
    }

    return (ans);
}
//  [javascript]
'use strict'

function main(s) {

  s = s.split('\n');

  const W = Number(s[0]);
  const H = 2;

  const table = s.slice(1, -1).map(l => l.split(' ').map(n => Number(n)));
  const max   = [...Array(H)].map(l => [...Array(W)].fill('#'));

  const que = [];
  const dh = [0, 1];
  const dw = [1, 0];

  que.push([0, 0]);
  max[0][0] = table[0][0];

  while (que.length > 0) {
    const p = que.shift();

    for (let i = 0; i < 2; i++) {
      const nh = p[0] + dh[i];
      const nw = p[1] + dw[i];
      if (nh < 0 || H <= nh) continue;
      if (nw < 0 || W <= nw) continue;

      que.push([nh, nw]);

      const prev = max[nh][nw];
      const next = max[p[0]][p[1]] + table[nh][nw];

      max[nh][nw] = (prev === '#') ? next : Math.max(prev, next);
    }
  }

  const ans = max[1][W - 1];
  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"math"
)

var N, ans int
var memo [2][101][100000]int

func main() {
	fmt.Scan(&N)

	A := make([][]int, 2)
	for i := 0; i < 2; i++ {
		A[i] = make([]int, N)

		for j := 0; j < N; j++ {
			fmt.Scan(&A[i][j])
		}
	}
	fmt.Println(dfs(0, 0, A[0][0], A))
}

func dfs(h int, w int, sum int, A [][]int) int {
	if h == 1 && w == N-1 {
		return sum
	} else {
		if memo[h][w][sum] != 0 {
			return memo[h][w][sum]
		}

		var x, y int

		if h == 0 {
			x = dfs(h+1, w, sum+A[h+1][w], A)
		}
		if w < N-1 {
			y = dfs(h, w+1, sum+A[h][w+1], A)
		}
		memo[h][w][sum] = max(x, y)
		return memo[h][w][sum]
	}
}

/*  ----------------------------------------  */

func combination(x, y int) int {
	return permutation(x, y) / permutation(y, y)
}

func permutation(x, y int) int {
	var ans int = 1
	for i := x - y; 0 < i; i-- {
		ans *= i
	}
	return ans
}

func max(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Max(float64(x[i]), float64(res)))
	}
	return res
}

func min(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Min(float64(x[i]), float64(res)))
	}
	return res
}
func pow(x, y int) int { return int(math.Pow(float64(x), float64(y))) }
func abs(x int) int    { return int(math.Abs(float64(x))) }
func floor(x int) int  { return int(math.Floor(float64(x))) }

type XY struct {
	x int
	y int
}
type SortBy []XY

func (a SortBy) Len() int      { return len(a) }
func (a SortBy) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a SortBy) Less(i, j int) bool {
	if a[i].x == a[j].x {
		return a[i].y > a[j].y
	}
	return a[i].x > a[j].x
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func nextFloat64() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()

	a1 := make([]int, n)
	a2 := make([]int, n)

	a1sum := make([]int, n)
	a2sum := make([]int, n)

	for i := 0; i < n; i++ {
		a1[i] = nextInt()
		a1sum[i] = a1[i]
		if i > 0 {
			a1sum[i] += a1sum[i-1]
		}
	}
	for i := 0; i < n; i++ {
		a2[len(a2)-i-1] = nextInt()
	}
	for k, v := range a2 {
		a2sum[k] = v
		if k > 0 {
			a2sum[k] += a2sum[k-1]
		}
	}

	ans := 0
	for i := 0; i < n; i++ {
		sum := a1sum[i] + a2sum[len(a2sum)-i-1]
		if ans < sum {
			ans = sum
		}
	}
	fmt.Println(ans)
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	n := nextInt()
	a := nextIntMat(2, n)
	maxc := 0

	for i := 0; i < n; i++ {
		nowc := 0
		for j := 0; j <= i; j++ {
			nowc += a[0][j]
		}
		for j := i; j < n; j++ {
			nowc += a[1][j]
		}
		maxc = max(maxc, nowc)
	}

	fmt.Println(maxc)

}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

// ---- readfunc
func scanInit() {
	const cap = 200 * 1024 // Default=64
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}
func nextIntMat(a int, b int) [][]int {
	mat := make([][]int, a)
	for i := 0; i < a; i++ {
		mat[i] = make([]int, b)
		for j := 0; j < b; j++ {
			mat[i][j] = nextInt()
		}
	}
	return mat
}
//  [ruby]
N = gets.chomp.to_i
A = Array.new(2).map{Array.new(N)}
2.times do |n|
    A[n] = gets.chomp.split.map(&:to_i)
end
dir = [[1,0],[0,1]]
node = []
node.push({:pos => [0,0], :score => 0, :log => Array.new(2).map{Array.new(N)}})
ans = []
while !node.empty?
    cur = node.shift

    cur[:score] += A[cur[:pos][0]][cur[:pos][1]]
    if cur[:pos][0] == 1 && cur[:pos][1] == N-1
        ans.push(cur[:score])
        next
    end

    dir.each do |d|
        childY = cur[:pos][0]+d[0]
        childX = cur[:pos][1]+d[1]
        if childY.between?(0,1) && childX.between?(0,N-1)
            if !cur[:log][childY][childX]
                cur[:log][childY][childX] = 0
                node.push({:pos => [childY, childX], :score => cur[:score], :log => Marshal.load(Marshal.dump(cur[:log]))})
            end
        end
    end
end
print "#{ans.max}\n"
//  [ruby]
N=gets.to_i
A=[]
A << gets.split.map(&:to_i)
A << gets.split.map(&:to_i)
sum=A[0][0]+A[1].inject(0){|r,i|r+i}
max=sum
(1 ... N).each{|i|
    sum+=A[0][i]
    sum-=A[1][i-1]
    if max<sum
        max=sum
    end
}
puts max
//  [ruby]
N = gets.to_i
A = gets.chomp.split(" ").map(&:to_i)
B = gets.chomp.split(" ").map(&:to_i)
max = 0
N.times do |i|
  sum = 0
  for j in 0..i
    sum += A[j]
  end
  for j in i..(N-1)
    sum += B[j]
  end
  max = [max,sum].max
end
puts max
//  [rust]
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::{Bytes, Chars};
#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
	input! {
		n: usize,
		a1: [usize; n],
		a2: [usize; n],
	}

	let mut s1 = vec![0usize; n];
	s1[0] = a1[0];
	for i in 1..n {
		s1[i] = s1[i-1] + a1[i];
	}

	let mut s2 = vec![0usize; n];
	s2[0] = a2[n-1];
	for i in 1..n {
		s2[i] = s2[i-1] + a2[n-1-i];
	}

	let mut ans = 0;
	for i in 0..n {
		ans = max(ans, s1[i]+s2[n-1-i]);
	}
	println!("{}", ans);
}
//  [rust]
// -*- coding:utf-8-unix -*-

use proconio::input;

fn main() {
    input! {
        n: u16,
        a: [[u16; n]; 2],
    }

    let mut sum_r1: u16 = a[0][0];
    let mut sum_r2: u16 = a[1].iter().sum();
    // println!("{}, {}", sum1, sum2);
    let mut ans = 0;
    for i in 0..n {
        if i != 0 {
            sum_r1 += a[0][i as usize];
            sum_r2 -= a[1][(i - 1) as usize];
        }
        // println!("{}: {} {}", i, sum_r1, sum_r2);
        if sum_r1 + sum_r2 > ans {
            ans = sum_r1 + sum_r2;
        }
    }

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