jiahuimbzuai/CoQuIR huggingface dataset:
//  [typescript]
function main(input: string) {
  const [[N,K], hs] = input.split("\n").map((v,i) => v.split(" ").map(vv=>parseInt(vv)));
  const arr = new Array(N);
  arr.fill(Infinity);
  arr[0] = 0 // 初期値
  for (let i = 1; i < N; i++) {
    for(let k = K; k > 0; k--) {
      if (i - k >= 0) {
        arr[i] = Math.min(arr[i], arr[i-k] + Math.abs(hs[i] - hs[i-k]));
      } 
    }
  }
  console.log(arr[N-1]);
}

main(
  require("fs")
    .readFileSync("/dev/stdin", "utf8")
    .trim()
);
//  [typescript]
import * as fs from "fs"

// 配列を作成して指定された値で初期化する
const createArray = <T>(length: number, initialValue: T): T[] => {
  const ary = []
  for (let i = 0; i < length; i++) {
    ary.push(initialValue)
  }
  return ary
}

// 配列の初期化などで使える、整数値の上限（これ同士を足してもオーバーフローしない）
const NUMBER_MAX = Math.floor(Number.MAX_SAFE_INTEGER / 2)

const process = (n: number, k: number, h: number[]): string => {
  // コストの配列を作る
  const ary = createArray(n, NUMBER_MAX)
  ary[0] = 0

  for (let i = 0; i < n; i++) {
    for (let j = 1; j <= k; j++) {
      if (i + j >= n) {
        break
      }

      const costJ = ary[i] + Math.abs(h[i] - h[i + j])
      if (ary[i + j] > costJ) {
        ary[i + j] = costJ
      }
    }
  }

  return ary[n - 1] + ""
}

const Main = (input: string): string => {
  const aa: string[][] = input.split("\n").map((e) => e.split(" "))
  const na0: number[] = aa[0].map((e) => parseInt(e))
  const na1: number[] = aa[1].map((e) => parseInt(e))
  const [n, k] = na0

  const res = process(n, k, na1) + ""
  console.log(res)
  return res
}
 Main(fs.readFileSync("/dev/stdin", "utf8"))
//  [typescript]
function main(input: string) {
  const [[N,K], hs] = input.split("\n").map((v,i) => v.split(" ").map(vv=>parseInt(vv)));
  const arr = new Array(N);
  arr.fill(Infinity);
  arr[0] = 0 // 初期値
  for (let i = 1; i < N; i++) {
    for(let k = K; k > 0; k--) {
      if (i - k >= 0) {
        arr[i] = Math.min(arr[i], arr[i-k] + Math.abs(hs[i] - hs[i-k]));
      } 
    }
  }
  console.log(arr[N-1]);
}

main(
  require("fs")a
    .readFileSync("/dev/stdin", "utf8")
    .trim()
);
//  [typescript]
import * as fs from "fs"

// 配列を作成して指定された値で初期化する
const createArray = <T>(length: number, initialValue: T): T[] => {
  const ary = []
  for (let i = 0; i < length; i++) {
    ary.push(initialValue)
  }
  return ary
}

const process = (n: number, k: number, h: number[]): string => {
  // コストの配列を作る
  const ary = createArray(n, 99999)
  ary[0] = 0

  for (let i = 0; i < n; i++) {
    for (let j = 1; j <= k; j++) {
      if (i + j >= n) {
        break
      }

      const costJ = ary[i] + Math.abs(h[i] - h[i + j])
      if (ary[i + j] > costJ) {
        ary[i + j] = costJ
      }
    }
  }

  return ary[n - 1] + ""
}

const Main = (input: string): string => {
  const aa: string[][] = input.split("\n").map((e) => e.split(" "))
  const na0: number[] = aa[0].map((e) => parseInt(e))
  const na1: number[] = aa[1].map((e) => parseInt(e))
  const [n, k] = na0

  const res = process(n, k, na1) + ""
  console.log(res)
  return res
}
Main(fs.readFileSync("/dev/stdin", "utf8"))
//  [python]
N,A,B = map(int,input().split())

ans1 = A * N
ans2 = B
print(min(ans1,ans2))
//  [python]
n, a, b = map(int, input().split())
train = n * a
print(min(train,b))
//  [python]
N,A,B=map(int,input().split())

print(min(N*A,B))
//  [python]
n,a,b=map(int,input().split())

if n*a >= b:
  ptiny(b)
else:
  print(n*a)
//  [python]
n,a,b=map(int,input().split())
print(max(a*n,b))
//  [python]
A, B, N = map(int, input().split())

if A * N > B:
    print(B)
else:
    print(A * N)
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {

		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String line = reader.readLine();
		String[] str = line.split(" ");
		int N = Integer.parseInt(str[0]);
		int A = Integer.parseInt(str[1]);
		int B = Integer.parseInt(str[2]);

		if (N * A <= B) {
			System.out.println(N*A);
		}
		else {
			System.out.println(B);
		}
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] NAB = br.readLine().split(" ");

		int N = Integer.parseInt(NAB[0]);
		int A = Integer.parseInt(NAB[1]);
		int B = Integer.parseInt(NAB[2]);

		if (N * A > B) {
			System.out.println(B);
		}
		if (N * A < B) {
			System.out.println(N * A);
		}
		if (N * A == B) {
			System.out.println(B);
		}
	}

}
//  [java]


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int k= 1;
        HashMap<String,Integer> hashMap = new HashMap<>();
        hashMap.put("SUN",7);
        hashMap.put("MON",6);
        hashMap.put("TUE",5);
        hashMap.put("WED",4);
        hashMap.put("THU",3);
        hashMap.put("FRI",2);
        hashMap.put("SAT",1);
        String s1;
        String s2;
        int a,b,c;
        double n;
        while(k-->0){
            c=s.nextInt();
            a=s.nextInt();
            b=s.nextInt();
            System.out.println(Math.min(a,b)*c);
        }
    }

    private static int binary_search(
            int arr[], int l,
            int h, int x)
    {
        while (l <= h) {
            int mid = (l + h) / 2;
            if (arr[mid] <= x)
                l = mid + 1;
            else
                h = mid - 1;
        }
        return h;
    }
    static int gcd(int a, int b)
    {
        if(b==0) {
            return a;
        }
        return gcd(b,a%b);
    }
    private static boolean isPrime(int n) {
        if (n == 2)
            return true;
        else if ((n % 2 == 0 && n > 2) || n < 2)
            return false;
        else {
            for (int i = 3; i <= (int) Math.sqrt(n); i += 2) {
                if (n % i == 0)
                    return false;
            }
            return true;
        }


    }

    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;
        }
    }

}
//  [java]

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

public class Main {


    public static void main(String[] args) throws IOException {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt(),a = s.nextInt(),b=s.nextInt();

        System.out.println(Math.min(n*a,n*b));
    }




}


class Scanner
{
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

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

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

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

    public String nextLine() throws IOException {return br.readLine();}

    public double nextDouble() throws IOException
    {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if(x.charAt(0) == '-')
        {
            neg = true;
            start++;
        }
        for(int i = start; i < x.length(); i++)
            if(x.charAt(i) == '.')
            {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            }
            else
            {
                sb.append(x.charAt(i));
                if(dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg?-1:1);
    }

    public boolean ready() throws IOException {return br.ready();}


}
//  [java]
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();

		if (N*A >= B) {
			System.out.println(N*A);
		} else {
			System.out.println(B);
		}

	}
}
//  [cpp]
// Written By NewbieChd
#include <cstdio>
#include <cctype>
#include <algorithm>
using namespace std;

const int BUF = 1000000;
char buf[BUF], *p1, *p2;
inline char getChar() { return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, BUF, stdin), p1 == p2) ? EOF : *p1++; }
inline int read() {
    register int f = 0;
    bool b = 1;
    char c;
    while (!isdigit(c = getChar()))
        if (c == 45)
            b = 0;
    do
        f = f * 10 + (c ^ 48);
    while (isdigit(c = getChar()));
    return b ? f : ~f + 1;
}

const int maxN = 100003;

int main() {
    int a = read(), b = read(), c = read();
    printf("%d\n", min(a * b, c));
    return 0;
}
//  [cpp]
#include<stdio.h>
int main()
{
	int a,b,c,t;
	scanf("%d%d%d",&a,&b,&c);
	if(a*b>c)
	t=c;
	else
	t=a*b;
	printf("%d",t);
 }
//  [cpp]
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
using namespace std;

int n,a,b; 

int read(){
	int t=1,s=0;
	char c=getchar();
	while((c>'9'||c<'0')&&c!='-')c=getchar();
	if(c=='-')t=-1,c=getchar();
	while(c>='0'&&c<='9')
	s=s*10+c-'0',c=getchar();
	return s*t;
}

int main(void){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%d %d %d",&n,&a,&b);
	int ans=min(n*a,b);
	printf("%d",ans);
}
//  [cpp]
#include <iostream>

int main() {
  int n, a, b; std::cin >> n >> a >> b;
  int ans = (n*a > b ? : b : n*a);
  std::cout << ans << std::endl;
  
  return 0;
}
//  [cpp]
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

int main()
{
    long l, r;
    cin >> l >> r;

    if (r - l >= 2018)
        cout << '0';
    else
    {
        int lmod = l % 2019;
        int rmod = r % 2019;
        if (lmod >= rmod)
            cout << '0';
        else
        {
            long ans = lmod * (lmod + 1);
            cout << ans << endl;
        }
    }
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<cmath>
#include<map>

using namespace std;

#define rep(i,N) for(int i=0;i<N;i++) //0から


typedef long long ll;




ll binary_search(vector<ll> a, ll n, ll key){
    ll right = n, left = -1;
    ll md = (right + left) / 2;

    while(right - left > 1){
        if(a[md] <= key){
            right = md;
        }else{
            left = md;
        }
        md = (right + left) / 2;
    }
    if(left == -1) return -1; //無い場合
    return right;
}

vector<ll> prime;
void Prime(ll n){ //線形篩,素数列挙
    vector<ll> p(n,0);
    p[0]=1;
    p[1]=1;
    for(ll i=2;i<n;i++){
        if(p[i]==0){
            prime.push_back(i);
            p[i]=i;
        }
        ll k=prime.size();
        for(ll j=0;j<k && i*prime[j]<n && prime[j]<=p[i];j++){
            p[i*prime[j]]=prime[j];
        }
    }
}

ll gcd(ll a,ll b){
    if(a<b){
        swap(a,b);
    }
    //a>=b
    ll r=a%b;
    while(r!=0){
        a=b;
        b=r;
        r=a%b;
    }
    return b;
}

#define MOD ((ll)1e+9 + 7)



//cout<<fixed<<setprecision(10);
int main(){
    int n,a,b;
    cout<<min(n*a,b)<<endl;


    return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

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

int main(void)
{
    int n, a, b;
    bool result = false;
    do{
        scanf("%d", &n);
        scanf("%d", &a);
        scanf("%d", &b);
        if((1 <= n && n <= 20) && (1 <= a && a <= 50) && (1 <= b && b <= 50)){
            result = true;
        }
    }while(result == false);

    int na = n * a;
    if (na <= b){
        printf("%d\n", na);
    }else{
        printf("%d\n", b);
    }
    return 0;
}
//  [c]
#include<stdio.h>

int main(){
	int n,d,i,j,sum = 0,num = 0;
	int x[100][100];
	scanf("%d %d",&n,&d);
	for(i = 0; i < n; i++){
		for(j = 0; j < d; j++){
			scanf("%d",&x[i][j]);
		}
	}
	
	for(int k = 0; k < n; k++){
	for(i = k + 1; i < n; i++){
		for(j = 0; j < d; j++){
			sum += (x[i][j] - x[k][j]) * (x[i][j] - x[k][j]);
			printf("%d\n",sum);
		}
	    for(j = 0; j <= sum; j++){
			if(sum == j * j){
				num += 1;
			}
	    }
		sum = 0;
	}
	}
	printf("%d",num);
}
//  [c]
#include<stdio.h>
int main(){
  int a,b,c;
  scanf("%d%d%d" &a,&b,&c);
  
  int d=a*b;
  
  int e=min({d,c});
  printf("%d", e);
  return 0;
}
//  [javascript]
function main(input){
  input = input.split("\n");
  var n = parseInt(input[0].split(" ")[0]);
  var a = parseInt(input[0].split(" ")[1]);
  var b = parseInt(input[0].split(" ")[2]);

  console.log(n*a > b ? b : n*a);
}
 
 
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
    input = input.trim()
  input = input.split(" ").map(Number);
  console.log(Math.min(input[0]*input[1],input[2]))
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input){
var all = input.split(" ");
var N = parseInt(all[0],10);
var A = parseInt(all[1],10);
var B = parseInt(all[2],10);

var na = A*N;
if(na>B){
    console.log(B);
}else{
    console.log(na);
}

}





Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict"

var inputs = '';
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', function(input) {
  inputs = input
})

reader.on('close', function() {
  let items = inputs.trim().split(' ')
  let n = parseInt(items[0])
  let a = parseInt(items[1])
  let b = parseInt(items[2])
  let train = n * a
  let taxi = b
  if(train < taxi){
    console.log(train)
    process.exit(1)
  }
  console.log(taxi)
  process.exit(1)
})
//  [javascript]
"use strict"

var inputs = '';
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', function(input) {
  inputs = input
})

reader.on('close', function() {
  const items = inputs.trim().split(' ')
  const n = parseInt(items[0])
  const a = parseInt(items[1])
  const b = parseInt(items[2])
  const train = n * a
  const taxi = b
  if(train < taxi){
    console.log(train)
    process.exit(1)
  }
  console.log(taxi)
  process.exit(1)
})
//  [javascript]
var inputs = '';
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
})

reader.on('line', function(input) {
  inputs = input
})

reader.on('close', function() {
  const items = inputs.trim().split(' ')
  const n = parseInt(items[0])
  const a = parseInt(items[1])
  const b = parseInt(items[2])
  const train = n * a
  const taxi = b
  if(train < taxi){
    console.log(train)
    process.exit(1)
  }
  console.log(taxi)
  process.exit(1)
})
//  [go]
package main

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

const (
	initialBufSize = 100000
	maxBufSize     = 10000000
)

var (
	sc = bufio.NewScanner(os.Stdin)
	wt = bufio.NewWriter(os.Stdout)
)

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

func nextInt() int {
	i, _ := strconv.Atoi(next())
	return i
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextFloat64s(n int) []float64 {
	slice := make([]float64, n)
	for i := 0; i < n; i++ {
		slice[i] = nextFloat64()
	}
	return slice
}

func putf(format string, a ...interface{}) {
	fmt.Fprintf(wt, format, a...)
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}

func min(nums ...int) int {
	ret := nums[0]
	for _, v := range nums {
		if v < ret {
			ret = v
		}
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initialBufSize), maxBufSize)
	defer wt.Flush()

	n, a, b := nextInt(), nextInt(), nextInt()

	puts(min(a*n, b))
}
//  [go]
package main

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

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

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

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	N, A, B := sc.nextInt(), sc.nextInt(), sc.nextInt()
	a := N * A
	fmt.Println(min(a, B))
}
//  [go]
package main

import "fmt"

func main() {

	var n, a, b int
	fmt.Scan(&n, &a, &b)

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

import "fmt"

func main() {
	var n, a, b int
	fmt.Scan(&n, &a, &b)
	if a > b {
		fmt.Println(n * b)
	} else {
		fmt.Println(n * a)
	}
}
//  [go]
// https://atcoder.jp/contests/abc133/tasks/abc133_c
package main

import (
	"fmt"
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func main() {
	var L, R int

	fmt.Scan(&L, &R)

	ans := 2019

	for i := L; i < min(R, L+2019); i++ {
		for j := i + 1; j <= min(R, L+2019); j++ {
			ans = min(ans, (i%2019)*(j%2019)%2019)
			//fmt.Printf("min = %v\n")
			// 割り切れたのなら、これ以上小さくならない
			if ans == 0 {
				break
			}
		}
	}

	fmt.Println(ans)
}
//  [go]
package main

import (
	"fmt"
	"math"
)

func main() {
	var r float64
	fmt.Scan(&r)
	fmt.Println(int(3 * math.Pow(r, 2)))
}
//  [ruby]
n,a,b = gets.split.map(&:to_i)

train = n * a
taxi = b

if train > taxi
  puts taxi
else
  puts train
end
//  [ruby]
n, a, b = gets.split.map(&:to_i)
puts [a * n, b].min
//  [ruby]
N, A, B = gets().split().map(&:to_i)
train_fare = N * A
if train_fare> B then
  puts B
else
  puts train_fare
end
//  [ruby]
n,a,b=gets.split.map(&:to_i)
p n*a+b
//  [ruby]
n, a, b = gets.chomp.split(" ").map(&:to_i)
puts a * n + b
//  [ruby]
input = readlines()
n, a, b = input.shift().chomp.split("\s").map{|x| x.to_i}

a_total = n * a
b_total = n % 4 == 0 ? (n / 4) * b : (n / 4 + 1) * b

puts [a_total, b_total].min
//  [rust]
// Input macro
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! stdin {
    () => {{
        use std::io::Read;
        let mut s = String::new();
        std::io::stdin().read_to_string(&mut s).unwrap();
        s
    }};
}

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

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

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

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

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

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

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

// Test Code
macro_rules! test {
    ($($input:expr => $output:expr),* $(,)*) => {
        #[test]
        fn solve_test() {
            $(
                assert_eq!(solve($input), $output);
            )*
        }
    };
}

// test code ==================================
test! {
    // example:  r##""## => ""
"4 2 9" => "8", "4 2 7"=>"7","4 2 8" => "8"
}

fn main() {
    println!("{}", solve(&stdin!()));
}

fn solve(src: &str) -> String {
    input! {
        source = src,
        n: i32,
        a: i32,
        b: i32,
    }
    (if a*n<b{a*n}else{b}).to_string()
}
//  [rust]
use std::cmp;

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)*}
    };
}

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! {
    	n:usize,
        a:usize,
        b:usize
    }
       
    println!("{}", cmp::min(n*a, b));
}
//  [rust]
use std::cmp::min;

fn main() {
  let (n, a, b) = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let mut ws = s.split_whitespace();
    let n: usize = ws.next().unwrap().parse().unwrap();
    let a: usize = ws.next().unwrap().parse().unwrap();
    let b: usize = ws.next().unwrap().parse().unwrap();
    (n, a, b)
  };

  print!("{}", min(n * a, b));
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        n:u8,
        a:u8,
        b:u8
    }
    let ans= 
    if n*a>b {n*a} else{b};
    println!("{}",ans);

}
//  [rust]
use proconio::input;

fn main() {
    input! {
        n:u8,
        a:u8,
        b:u8
    }
    let ans= 
    if a>b {n*b} else{a*3};
    println!("{}",ans);

}
//  [rust]
use std::cmp;

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)*}
    };
}

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! {
    	n:usize,
        a:usize,
        b:usize
    }
       
    println!("{}", n*a+b);
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let nab=readInts()
let n=nab[0]
let a=nab[1]
let b=nab[2]
if n*a<b {
  print(n*a)
}else{
  print(b)
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
    
let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
print(min(b,n*a))
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]

if n*a<b {
  print(n*a)
} else {
  print(b)
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
    
let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
print(min(b,n*a))
//  [swift]
#複数の値をスペースで繋いで受け取る時のテンプレ
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
    
let nab = readInts()
let n = nab[0]
let a = nab[1]
let b = nab[2]
＃ここまでテンプレ
print(min(b,n*a))
//  [typescript]
export class Main {
  static main(input): string {
    const [n, a, b]: number[] = input.split("\n")[0].split(" ").map(a => parseInt(a));
    const t: number = n * a;
    return `${Math.min(t, b)}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
import * as fs from 'fs';

// 4 2 9
// 8
const main = (inp: string) => {
    const [n, a, b]: number[] = inp.split(' ').map(Number);
    const train: number = n * a;
    const taxi: number = b;
    console.log(train < taxi ? train : taxi);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
function Main(args) {
  const inputs = args.split(" ");
  const n = inputs[0];
  const a = inputs[1];
  const b = inputs[2];
  if (a * n > b) {
    console.log(b);
    return;
  }
  console.log(a * n);
}

// 標準入力
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from 'fs';

// 4 2 9
// 8
const main = (inp: string) => {
    const [n, a, b]: number[] = inp.split(' ').map(Number);
    const train: number = n * a;
    const taxi: number = b;
    console.log(train > taxi ? train : taxi);
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [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 sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let [a,b,c]=nrin(3)
  out(min(c*a, b))
}
main()
//  [typescript]
export class Main {
  static main(input): string {
    const [n, a, b]: number[] = input.split("\n")[0].split(" ").map(a => parseInt(a));
    const t: number = n * a;
    const tmp: number[] = [Math.floor(n / b), n % b];
    const partialTax: number = tmp[0] * b + a * tmp[1];
    const allTax: number = tmp[0] * b + (tmp[1] == 0 ? 0 : b);
    const tax: number = Math.min(partialTax, allTax);
    return `${t < tax ? t : tax}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [python]
a,b,c = input().split()
print(a[0]+b[0]+c[0])
//  [python]
a, b, c = input().split()
print(a[0] + b[0] + c[0])
//  [python]
#048-A
a, b, c = input().split()
print(a[0]+b[0]+c[0])
//  [python]
arr = list(input().split())
print(arr[0].[0] + arr[1].[0] + arr[2].[0])
//  [python]
string = input()
    Capital = string[0]
    print("A" + Capital + "C")
//  [python]
def iroha():
    string = input()
    Capital = string[0]
    print("A" + Capital + "C")

if __name__ == "__main__":
    iroha()
//  [java]
import java.util.*;
import java.io.*;
import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String a = sc.next();
		String x = sc.next();
		String b = sc.next();
		
		// 計算
		String result = "";
		result = "A" + x.charAt(0) + "C";
		
		// 出力
		System.out.println(result);
	}
	
	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}
}
//  [java]

import java.util.*;

public class Main {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        String c[] = new String[3];
        c[0] = input.next();
        c[1] = input.next();
        c[2] = input.next();
        if (c[1].charAt(0) == 'B') {
            System.out.println("ABC");
            System.out.println("The contest in which you are participating now.");
        }
        if (c[1].charAt(0) == 'S') {
            System.out.println("ASC");
            System.out.println("This contest does not actually exist.");
        }
        if (c[1].charAt(0) == 'X') {
            System.out.println("AXC");
        }
    }
}
//  [java]
import java.util.Scanner;
public class Main {
	public static void main(String[]  args) {
		Scanner input = new Scanner(System.in);		
          String x = input.nextLine();
		  String Splitt[] = x.split(" ");
		  for(String word: Splitt){
		     System.out.println(word.charAt(0)); }
		   }
			
		}
//  [java]
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long x = sc.nextLong();
		long res=0;
		if (b-a ==0) {
			res =0;;
		}
		else {
			res = (b/x) - (a/x);		
		if (b%x==0) {
			res++;}}
		
		System.out.println(res);
	}

}
//  [cpp]
#include<stdio.h>
#include<string.h>
int main()
{
    int i,k;
    char a[100],b[100],c[100];
    scanf("%s%s%s",a,b,c);
    printf("%c%c%c\n",a[0],b[0],c[0]);
    return 0;
}
//  [cpp]
#include<cstdio>
using namespace std;
char a[10001],b[10001],c[10001]; 
int main()
{
	scanf("%s%s%s",a,b,c);
	printf("%c%c%c\n",a[0],b[0],c[0]);
	return 0;
}
//  [cpp]
#include<cstdio>
using namespace std;
int main(){
	int a=1;
	bool f=true;
	while(a!=3){
		char b=getchar();
		if(f){
			putchar(b);
			f=false;
		}
		if(b==' '){
			b=getchar();
			putchar(b);
			a++;
		}
	}
	return 0;
}
//  [cpp]
#include <iostream>
using namespace std;

int main() {
  string str1, str2, str3;
  cin >> str1 >> str2 >> str3;
  cout << 'A'+str2.at(0)+'C' << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  string s, t, u;
  cin >> s >> t >> u;

  cout << 'A' + t.at(0) + 'C' << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  string s, t, u;
  cin >> s, t, u;

  cout << 'A' + t.at(0) + 'C' << endl;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(void)

{
	char at[10];
	char s[150];
	char co[10];
	scanf("%s %s %s",at,s,co);
	
	printf("%c%c%c\n",at[0],s[0],co[0]);
	return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  char str[128];
  scanf("%127[^\n]",str);
  printf("A%cC\n",str[8]);
  return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main()
{
 char s[100];

 fgets(s,100,stdin);

 printf("\nA%cC\n",s[8]);

 return 0;
 }
//  [c]
#include <stdio.h>

int main () {
	char str[102];
	for (int i = 0; str[i] != '\0'; i++) {
		scanf("AtCoder %s Contest", &str[i]);
		if ( str[i] >= 'A' && str[i] <= 'Z') {
			printf("A%cC", str[i]);
		}
		else {
			continue;
		}
	}
	return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main()
{
    char S[100],A[8],C[7];
    int i=1,a=0;
    scanf("%s  %s  %s",&A, &S, &C);
    if(1<=strlen(S) && strlen(S)<=100){
        if(S[0]>= 'A' && S[0]<= 'Z' && A[0]>='A' && A[0]<='Z' && C[0]>= 'A' && C[0]<='Z'){
        for(i=1;i<strlen(S);i++){
            if(S[i]>= 'a' && S[i]<= 'z') a+=1;
            continue;
            }
      if(a==(strlen(S)-1)) printf("\n%c%c%c",A[0],S[0],C[0]);
        }
    }
return 0;
}
//  [c]
#include<string.h>

int main()
{
    char S[100];
    int i=1,a=0;
    scanf("%s",&S);
    if(1<=strlen(S) && strlen(S)<=100){
        if(S[0]>= 'A' && S[0]<= 'Z'){
        for(i=1;i<strlen(S);i++){
            if(S[i]>= 'a' && S[i]<= 'z') a+=1;
            continue;
            }
      if(a==(strlen(S)-1)) printf("\nA%cC",S[0]);
        }
    }
return 0;
}
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0].split(' ')
inp.shift()
b = inp.shift()[0].toUpperCase()
console.log('A'+b+'C')
//  [javascript]
function Main(input) {
  input = input.trim()
  var N = input.split("");
  console.log("A"+N[8]+"C");

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
//https://abc048.contest.atcoder.jp/tasks/abc045_b
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = input[0];
	var b = input[1];
    var c = input[2];
    a=a.charAt(0);
    b=b.charAt(0);
    c=c.charAt(0);
 
	//出力
    console.log(a+b+c);
    

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
  const a = input.trim().split(' ');
  console.log('A'+a.substring(8,9)+'C');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  const a = input.split(' ');
  console.log('A'+a.substring(8,9)+'C');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
import sys
import os
 
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
 
iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
 
 
def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")
 
    A, B, C = sl()
    print(A[0] + B[0] + C[0])
 
 
if __name__ == '__main__':
    main()
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b, c string
	fmt.Scan(&a, &b, &c)
	fmt.Printf("%s%s%s", a[0:1], b[0:1], c[0:1])
}
//  [go]
package main
import "fmt"
var s1,s2,s3 string
func main(){
	
  fmt.Scanln(&s1,&s2,&s3)
  fmt.Printf("%c%c%c",s1[0],s2[0],s3[0])

  
}
//  [go]
package main
import "fmt"
var s1,s2,s3 string
func main(){
	
  fmt.Scanln(&s1,&s2,&s3)
  fmt.Printf(s1[0])
  fmt.Printf(s2[0])
  fmt.Printf(s3[0])
  
}
//  [go]
package main
import "fmt"
var s1,s2,s3 string
func main(){
	
  fmt.Scanln(&s1,&s2,&s3)
  fmt.printf(s1[0])
  fmt.printf(s2[0])
  fmt.printf(s3[0])
  
}
//  [ruby]
a,b,c = gets.chomp.split(" ")
puts a.slice(0) + b.slice(0) + c.slice(0)
//  [ruby]
puts "A#{gets[8].upcase}C"
//  [ruby]
a, b, c = gets.split.map(&:to_s)
puts a[0] + b[0] + c[0]
//  [ruby]
line = gets.split(' ')
a = line[0].to_i
b = line[1].to_i
x = line[2].to_i

ans = (b - a).div(x)

ans += 1 if a % x == 0
ans += 1 if b % x == 0
ans -= 1 if a % x == 0 && b % x == 0
p ans
//  [ruby]
puts "AtCoder Smell Contest".split.map {|k| k[0]}.join
//  [ruby]
def contenst(word)
  puts "A#{x[0]}C"
end

A,x,C = gets.chomp.split(" ").map(&:to_s)
contenst(x)
//  [rust]
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)*}
    };
}

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!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A");
    print!("{}", (p[0].to_string()).to_uppercase());
    print!("C");
}
//  [rust]
use std::io::stdin;

fn main() {
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    let a = s
        .split_whitespace()
        .map(|e| e.chars().next().unwrap())
        .skip(1)
        .next()
        .unwrap();

    println!("A{}C", a);
}
//  [rust]
use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.trim().split_whitespace();
	for i in iter {
		let s:Vec<char> = i.chars().collect::<Vec<char>>();
		print!("{}", s[0]);
	}
	println!("");
}
//  [rust]
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)*}
    };
}

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!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A");
    print!("{}", (p[0]).to_uppercase());
    print!("C");
}
//  [rust]
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)*}
    };
}

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!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A{}C", (p[0]).to_uppercase());
}
//  [rust]
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)*}
    };
}

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!{
        s:chars,
        p:chars,
        q:chars,
    }
    print!("A{}C", p[0].to_uppercase());
}
//  [swift]
var s="";readLine()!.characters.split(" ").map{String($0)}.forEach{s+=$0.characters.map{String($0)}[0]};print(s)
//  [swift]
import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = split[0]
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = split[1]

let z = split[2]

print("A" + y.prefix(1) + "C")   // B
//  [swift]

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = split[0]
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = split[1]

let z = split[2]


print("A"+y.prefix(1)+"C")
//  [swift]
import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

print(y.prefix(1)) 
print("A"+y+"C")
//  [swift]
import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

var y.prefix(1)) // B
print("A"+y+"C")
//  [swift]
import Foundation

import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let x = Int(split[0])!
//String -> Intの型変換はnilが返る可能性があるので、ラップされたOptional<Int>型が返るので強制アンラップ
let y = Int(split[1])!

let z = Int(split[2])

var y.prefix(1)) // B
print("A"+"Y"+"C")
//  [typescript]
const main = (input: string) => {
    const hoge: string = input.split(" ")[1]
    console.log("A" + hoge.split("")[0] + "C")
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
import * as fs from "fs";
 
let input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
var contest = input[0].split(" ");
var s = contest[1];
var result = "A" + s[0] + "C";

console.log(result);
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const str1 = input[0];
  const str2 = input[1];
  const str3 = input[2];
  
  console.log(str1.charAt()+str2.charAt()+str3.charAt());
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const a = parseInt(input[0], 10);
  const b = parseInt(input[1], 10);
  const x = parseInt(input[2], 10);
  
  const count = 0;
  
  for (a; a<=b a++) {
    if (a%x===0) {
      count ++;
    }
    if (a==b) break;
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input) => {
  input = input.split('\n');
  const a = parseInt(input[0], 10).split(' ');
  const b = parseInt(input[1], 10).split(' ');
  const x = parseInt(input[2], 10).split(' ');
  
  const count = 0;
  
  for (a; a<=b a++) {
    if (a%x===0) {
      count ++;
    }
  }
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));