jiahuimbzuai/CoQuIR huggingface dataset:
//  [c]
#include <stdio.h>
#include <string.h>
int main(void){

	char s[200000];
	scanf("%s",s);
	int fin;
	fin = strlen(s);

	int b,e;
	int i;
	for(i=0; i<fin; i++){
		if(s[i]=='A'){
			b =i;
			break;
		}
	}

	for(i=fin-1; i>=0; i--){
		if(s[i]=='Z'){
			e = i;
			break;
		}
	}
	printf("%d\n", e-b+1);

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

int main(){
char ch;
int s=0,e=0;
int len=0;

while (1)
{
  scanf("%c",&ch);
  if (ch=='\n'){break;}
  
  len++;
  if (s==0){
    if (ch=='A'){s=len;}
  }else{
    if (ch=='Z'){e=len;}
  }
}
printf("%d",e-s+1);
return 0;

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

int main(){
  int i = 0, j = 0, k = 0, A_num[200000], Z_num[200000], length;
  char str[200000];
  while(1){
    scanf("%c", &str[i]);
    if(str[i] == 'A'){
       A_num[j] = i;
       j += 1;
    }else if(str[i] == 'Z'){
      Z_num[k] = i;
      k += 1;
    }else if(str[i] == '\n'){
      break;
    }
    i += 1;
  }

  length = Z_num[k-1] - A_num[0] + 1;
  printf("%d\n", length);
  return 0;
}
//  [javascript]
'use strict'

const main = input => {
	const s = input.trim()
	const md = s.match(/A.*Z/)
	if (md) console.log(md[0].length)
	else console.log(0)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
"use strict";
const main = arg => {
  let txt = arg.split("");
  let A = txt.indexOf("A");
  let Z = txt.lastIndexOf("Z");
  console.log(Z - A + 1);
}

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

function Main(input) {
  const a = input.indexOf("A");
  const z = input.lastIndexOf("Z");
  const inputLen = input.length;
  console.log(z-a+1);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
)

func main() {

	var s string
	var a_index = -1
	var z_index = -1

	fmt.Scanln(&s)
	for i := 0; i < len(s); i++ {
		if s[i] == 'A' && a_index == -1 {
			a_index = i
		} else if s[i] == 'Z' {
			z_index = i
		}
	}

	fmt.Println(z_index - a_index + 1)

}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)

	var aIndex = strings.Index(s, "A")
	var zIndex = strings.LastIndex(s, "Z")

	var answer = zIndex - aIndex + 1
	fmt.Println(answer)
}
//  [go]
package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	var a, z int
	var A bool
	for i := 0; i < len(s); i++ {
		if s[i] == 'A' && !A {
			a = i
			A = true
		}
		if s[i] == 'Z' {
			z = i
		}
	}
	fmt.Println(z - a + 1)
}
//  [ruby]
str = $<.gets.chomp.split('')

ret = {A: [], Z: []}
str.each_with_index do |v, i|
  ret[:A] << i if v == 'A'
  ret[:Z] << i if v == 'Z'
end
puts "#{ret[:Z][-1] - ret[:A].first + 1}"
//  [ruby]
s = gets.strip.split("")
a = []
z = []
s.each_with_index do |k, i|
  a << i if k == "A"
  z << i if k == "Z"
end
puts z.max - a.min + 1
//  [ruby]
include Math
define_method :max, -> (a,b) { a > b ? a : b }
define_method :min, -> (a,b) { a < b ?  a : b }
define_method :swap, -> (a,b) { a, b = b, a }
define_method :rep, -> (num, &block) { num.times do |i| block.call(i) end }
define_method :repl, -> (st,en, &block) { st.upto en-1 do |i| block.call(i) end }
define_method :array, -> (size,init = nil) { Array.new(size){init} }
define_method :darray, -> (size1, size2, init = nil) { Array.new(size1){Array.new(size2){init}} }
define_method :gi, -> () { gets.split.map(&:to_i) }
define_method :gs, -> () { gets.chomp }
define_method :putall, -> (obj) { obj.each do |o| puts o end }
define_method :fi, ->() {first}


str = gs.split("")
st = nil
en = nil
rep str.size do |i|
	if st == nil && str[i] == "A"
		st = i
	elsif str[i] == "Z"
		en = i
	end
end

puts en - st + 1
//  [rust]
#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use text_io::*;

const U_INF: usize = 1 << 60;
const I_INF: isize = 1 << 60;

fn main() {
    let  s : String = read!();
    let s = s.chars().collect::<Vec<char>>();
    let f = s.iter().position(|c| *c=='A').unwrap();
    let e = s.len() - s.iter().rev().position(|c| *c=='Z').unwrap();

    println!("{}", e-f);
}
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {s: String};
    let s: String = s;

    let mut count = 0;
    let mut a_index = 20_000_000;
    let mut z_index = 0;

    for s_i in s.chars() {
        if s_i == 'A' && a_index == 20_000_000 {
            a_index = count;
        }

        if s_i == 'Z' {
            z_index = count;
        }

        count += 1;
    }

    println!("{}", z_index - a_index + 1)
}
//  [typescript]
import * as fs from 'fs';
const input = fs.readFileSync("/dev/stdin", "utf8");
// 

const chars = input.split("");

const aIdx = chars.findIndex(char => char === 'A');
const zReverseIdx = chars.reverse().findIndex(char => char ==='Z');
const zIdx = chars.length - zReverseIdx;

const length = zIdx - aIdx
console.log(length);
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  let s=ts(),a,z
  a=s.indexOf('A')
  z=s.length-s.split('').reverse().join('').indexOf('Z')
  to(z-a)
}
main()
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim();
   let strA = xs.indexOf('A');
   let strZ = xs.lastIndexOf("Z");
   console.log(strZ-strA+1);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [python]
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt, pi
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

X = getN()

if 400 <= X <= 599:
    print(8)
elif 600 <= X <= 799:
    print(7)
elif 800 <= X <= 999:
    print(6)
elif 1000 <= X <= 1199:
    print(5)
elif 1200 <= X <= 1399:
    print(4)
elif 1400 <= X <= 1599:
    print(3)
elif 1600 <= X <= 1799:
    print(2)
else:
    print(1)
//  [python]
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(X):
    if X >= 1800:
        return 1
    elif X >= 1600:
        return 2
    elif X >= 1400:
        return 3
    elif X >= 1200:
        return 4
    elif X >= 1000:
        return 5
    elif X >= 800:
        return 6
    elif X >= 600:
        return 7
    return 8


def main():
    X = read_int()
    print(slv(X))


if __name__ == '__main__':
    main()
//  [java]


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();
		scan.close();

		if(400<=x && x<=599) {
			System.out.println(8);
		}else if(600<=x && x<=799) {
			System.out.println(7);
		}else if(800<=x && x<=999) {
			System.out.println(6);
		}else if(1000<=x && x<=1199) {
			System.out.println(5);
		}else if(1200<=x && x<=1399) {
			System.out.println(4);
		}else if(1400<=x && x<=1599) {
			System.out.println(3);
		}else if(1600<=x && x<=1799) {
			System.out.println(2);
		}else if(1800<=x && x<=1999) {
			System.out.println(1);
		}

	}

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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		sc.close();

		if(n>=400&&n<=599) {
			System.out.println(8);
		} else if(n>=600&&n<=799) {
			System.out.println(7);
		} else if(n>=800&&n<=999) {
			System.out.println(6);
		} else if(n>=1000&&n<=1199) {
			System.out.println(5);
		} else if(n>=1200&&n<=1399) {
			System.out.println(4);
		} else if(n>=1400&&n<=1599) {
			System.out.println(3);
		} else if(n>=1600&&n<=1799) {
			System.out.println(2);
		} else if(n>=1800&&n<=1999) {
			System.out.println(1);
	}
	}
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

#define fastio 			ios::sync_with_stdio(0);	cin.tie(0); cout.tie(0);  cout<<fixed;  cout<<setprecision(12);	
#define randomINT 		mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define	newl 			cout<<"\n"
#define DISP(as)		for(auto it : as) cout<<it<<" ";newl;
#define all(x)         	(x).begin(),(x).end()
#define mset(x,val)    	memset(x,val,sizeof(x))
#define newl           	cout<<"\n"
#define pb             	push_back
#define mp             	make_pair
#define f 				first
#define s 				second
#define dline          cerr<<"///REACHED///\n";
#define deb1(x)        cerr<<#x<<" = "<<x<<'\n';
#define deb2(x,y)      cerr<<'['<<#x<<','<<#y<<"] = "<<'['<<x<<','<<y<<']'<<'\n';
#define deb3(x,y,z)    cerr<<'['<<#x<<','<<#y<<','<<#z<<"] = "<<'['<<x<<','<<y<<','<<z<<']'<<'\n';

typedef long long 				ll;
typedef long double 			ld;
typedef vector<ll> 				vll;
typedef pair<ll ,ll> 			pll;
typedef pair<ld,ld> 			pld;
typedef unordered_map<ll,ll> 	um;
typedef vector<pll> 			vpll;

const ll 	MAX5 	= 	1e+5+7;
const ll 	MAX7 	= 	1e+7+7;
const ll 	MAXN 	= 	MAX7;
const ll   	INF   	=  	0x7f7f7f7f7f7f7f7f;
const int  	INFi 	=  	0x7f7f7f7f;
const ll 	MOD		=  	1e+9+7;

vll adj[MAXN];ll visit[MAXN]={};
int dx8[]={0,1,1,1,0,-1,-1,-1}, dy8[]={1,1,0,-1,-1,-1,0,1};
int dx4[]={0,1,0,-1}, dy4[]={1,0,-1,0};

// <------------- Declare Variables Here ------------> //

ll T=1;
ll n,x,m;
string s;
vll f;
// <------------- Implement Functions Here ----------> //

void fact() {
	f.pb(1);
	for(ll i=1;i<=max(n,m);i++) {
		f.pb((i * f[i-1])%MOD);
	}
}

// <------------- Start of main() -------------------> //

void MAIN() {
	cin >> n;
	if(n >= 1800) cout<<1;
	else if(n >= 1600) cout<<2;
	else if(n >= 1400) cout<<3;
	else if(n >= 1200) cout<<4;
	else if(n >= 1000) cout<<5;
	else if(n >= 800) cout<<6;
	else if(n >= 600) cout<<7;
	else cout<<8;

}

int main() {
	fastio;randomINT;
	//cin>>t;
	while(T--) {
		MAIN();
	}
	return 0;
}
//  [c]
#include <stdio.h>

int main(void)
{
	int		i;
    
    scanf("%d", &i);
    if (i < 600)
    	printf("8");
    else if (i < 800)
    	printf("7");
    else if (i < 1000)
    	printf("6");
    else if (i < 1200)
    	printf("5");
    else if (i < 1400)
    	printf("4");
    else if (i < 1600)
    	printf("3");
    else if (i < 1800)
    	printf("2");
    else if (i < 2000)
    	printf("1");
    return (0);
}
//  [c]
#include<stdio.h>

int main(void)
{
	int X;

	scanf("%d", &X);

	if (X >= 400 && X <= 599)
	{
		printf("8");
	}
	else if (X >= 600 && X <= 799)
	{
		printf("7");
	}
	else if (X >= 800 && X <= 999)
	{
		printf("6");
	}
	else if (X >= 1000 && X <= 1199)
	{
		printf("5");
	}
	else if (X >= 1200 && X <= 1399)
	{
		printf("4");
	}
	else if (X >= 1400 && X <= 1599)
	{
		printf("3");
	}
	else if (X >= 1600 && X <= 1799)
	{
		printf("2");
	}
	else if (X >= 1800 && X <= 1999)
	{
		printf("1");
	}
	printf("\n");

	return 0;
}
//  [c]
#include<stdio.h>
int main(){
	int x;
	scanf("%d",&x);
	if(400<=x&&x<=599){
		printf("8");
		return 0;
	}
	else if(600<=x&&x<=799){
		printf("7");
		return 0;
	}
	else if(800<=x&&x<=999){
		printf("6");
		return 0;
	}
	else if(1000<=x&&x<=1199){
		printf("5");
		return 0;
	}
	else if(1200<=x&&x<=1399){
		printf("4");
		return 0;
	}
	else if(1400<=x&&x<=1599){
		printf("3");
		return 0;
	}
	else if(1600<=x&&x<=1799){
		printf("2");
		return 0;
	}
	else if(1800<=x&&x<=1999){
		printf("1");
		return 0;
	}
}
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
x = inp.shift() * 1
console.log(10 - parseInt(x / 200))
//  [javascript]
//↓見なくていいよ！ここから--------------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function makeClone(obj){return JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){  
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//↑見なくていいよ！ここまで--------------------------------------------------
function Main(){
	var N = nextInt();
	if(N >= 400 && N <= 599){
		myout(8);
	}else if(N >= 600 && N <= 799){
		myout(7);
	}else if(N >= 800 && N <= 999){
		myout(6);
	}else if(N >= 1000 && N <= 1199){
		myout(5);
	}else if(N >= 1200 && N <= 1399){
		myout(4);
	}else if(N >= 1400 && N <= 1599){
		myout(3);
	}else if(N >= 1600 && N <= 1799){
		myout(2);
	}else if(N >= 1800 && N <= 1999){
		myout(1);
	}
}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {

	input = input.split("\n");
	const num = parseInt(input[0], 10);
	let kyu;
	if (num >= 400) { kyu = 8 }
	if (num >= 600) { kyu = 7 }
	if (num >= 800) { kyu = 6 }
	if (num >= 1000) { kyu = 5 }
	if (num >= 1200) { kyu = 4 }
	if (num >= 1400) { kyu = 3 }
	if (num >= 1600) { kyu = 2 }
	if (num >= 1800) { kyu = 1 }
	//出力
	console.log('%d', kyu);
}

// 実行 ファイル名により本番かどうか判断
if (__filename.match("Main.js$")) {
	Main(require("fs").readFileSync("/dev/stdin", "utf8"));
} else {
//	Main("3\n4 5\nhello\n");
	Main(require("fs").readFileSync("q1.txt", "utf8"));
}
//  [go]
package main

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

func main() {
	sc := NewScanner()

	x := sc.ReadInt()

	grade := 0
	if x < 600 {
		grade = 8
	} else if x < 800 {
		grade = 7
	} else if x < 1000 {
		grade = 6
	} else if x < 1200 {
		grade = 5
	} else if x < 1400 {
		grade = 4
	} else if x < 1600 {
		grade = 3
	} else if x < 1800 {
		grade = 2
	} else {
		grade = 1
	}

	fmt.Println(grade)
}

// from [my library](https://github.com/ikngtty/go-contestlib)
// -   math/simple

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

func Min(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}

	min := values[0]
	for _, v := range values {
		if v < min {
			min = v
		}
	}
	return min
}

func Max(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}

	max := values[0]
	for _, v := range values {
		if v > max {
			max = v
		}
	}
	return max
}

func Pow(base, exponent int) int {
	if exponent < 0 {
		panic(fmt.Sprintf("exponent (%d) should not be a minus", exponent))
	}

	answer := 1
	for i := 0; i < exponent; i++ {
		answer *= base
	}
	return answer
}

func Ceil(divident, dividor int) int {
	if dividor == 0 {
		panic("dividor should not be 0")
	}

	quo := divident / dividor
	rem := divident % dividor

	if rem != 0 {
		if (divident > 0 && dividor > 0) ||
			(divident < 0 && dividor < 0) {
			return quo + 1
		}
	}
	return quo
}

// -   sortutil

func ReverseInts(a []int) {
	sort.Sort(sort.Reverse(sort.IntSlice(a)))
}

func ReverseStrings(a []string) {
	sort.Sort(sort.Reverse(sort.StringSlice(a)))
}

// -   io

type Scanner struct {
	bufScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bufSc := bufio.NewScanner(os.Stdin)
	bufSc.Split(bufio.ScanWords)
	bufSc.Buffer(nil, 100000000)
	return &Scanner{bufSc}
}

func (sc *Scanner) ReadString() string {
	bufSc := sc.bufScanner
	bufSc.Scan()
	return bufSc.Text()
}

func (sc *Scanner) ReadInt() int {
	bufSc := sc.bufScanner
	bufSc.Scan()
	text := bufSc.Text()

	num, err := strconv.Atoi(text)
	if err != nil {
		panic(err)
	}
	return num
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var x, l int
	fmt.Scan(&x)

	l = 10 - (x / 200)
	fmt.Printf("%d", l)
}
//  [ruby]
require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
x = gets.chomp.to_i

puts 8 - (x - 400) / 200
//  [ruby]
x = gets.to_i

if 400 <= x && x <= 599
  puts 8
elsif 600 <= x && x <= 799
  puts 7
elsif 800 <= x && x <= 999
  puts 6
elsif 1000 <= x && x <= 1199
  puts 5
elsif 1200 <= x && x <= 1399
  puts 4
elsif 1400 <= x && x <= 1599
  puts 3
elsif 1600 <= x && x <= 1799
  puts 2
elsif 1800 <= x && x <= 1999
  puts 1
end
//  [ruby]
p case gets.to_i
when 400..599; 8
when 600..799; 7
when 800..999; 6
when 1000..1199; 5
when 1200..1399; 4
when 1400..1599; 3
when 1600..1799; 2
when 1800..1999; 1
end
//  [rust]
// -*- coding:utf-8-unix -*-

use proconio::{fastout, input};

// ABC086C - Traveling
// https://atcoder.jp/contests/abs/fasks/arc089_a

#[fastout]
fn main() {
    input! {
        x: usize,
    }
    let kyu = 8 - (x - 400) / 200;
    println!("{}", kyu);
}
//  [swift]
func main() {
    let x = Int(readLine()!)!
    print(8 - (x - 400) / 200)
}

main()
//  [swift]
var x = Int(readLine()!)!
var kyu = 8
while x>=600{
	x -= 200
	kyu -= 1
}
print(kyu)
//  [swift]
// 🐋💭  Buy an Integer
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

func main() {
    let x = readInt()
    
    if x >= 400 && x <= 599 {
        print(8)
        return
    }
    if x >= 600 && x <= 799 {
        print(7)
        return
    }
    if x >= 800 && x <= 999 {
        print(6)
        return
    }
    if x >= 1000 && x <= 1199 {
        print(5)
        return
    }
    if x >= 1200 && x <= 1399 {
        print(4)
        return
    }
    if x >= 1400 && x <= 1599 {
        print(3)
        return
    }
    if x >= 1600 && x <= 1799 {
        print(2)
        return
    }
    print(1)
    return
    
}
main()
//  [python]
a,b=map(int, input().split())
print(int((a*3+b)/2))
//  [python]
A,P = map(int,input().split())
print((3*A + P)//2)
//  [python]
a = list(map(int, input().split()))

print((a[0] * 3 + a[1]) // 2)
//  [python]
#Python標準入出力

import numpy as np

# 1行に複数の文字列（数字）を取得，整数に直す
# In[0] = A, [1] = P
In = list(map(int, input().split()))

A = In[0]
P = In[1]

piece = 3*A + P
pie = int(piece/2)

print(pie)
//  [python]
#!venv/bin/python
 
import math
import numpy as np
import random
import copy
import statistics 
import bisect
import heapq
from collections import defaultdict 

import random #入力整数列Aの生成に使用

A, P = [ int(x) for x in input().split() ]

print (math.floor((A * 3 + P) / 2))
//  [python]
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from copy import copy
import numpy as np
from numpy.fft import fft, ifft
from fractions import gcd


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


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

a, p = MAP()

print(int((a*3+p)/2))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

class Main {

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

        try {

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

            List<String> input = Arrays.asList(br.readLine().split(" "));
            int normalAppleCount = Integer.parseInt(input.get(0));
            int errorAppleCount = Integer.parseInt(input.get(1));

            int applePieCount = (normalAppleCount * 3 + errorAppleCount) / 2;

            System.out.println(applePieCount);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}
//  [java]
import java.util.Scanner;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str  = sc.nextLine();
        String[] astr = str.split(" "); //状況に合わせて
        Boolean flag  = true;
        int[] in_data = Stream.of(astr).mapToInt(x->{
            try{
                return Integer.parseInt(x);
            }
            catch(Exception e){
                e.printStackTrace();
            }
            return 0;
        }).toArray();
        sc.close();
        int a = in_data[0];
        int p = in_data[1];

        int tmp = a * 3 + p;
        System.out.println(tmp/2);
    }
}
//  [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 p = sc.nextInt();

		System.out.println((a * 3 + p) / 2);

	}
}
//  [cpp]
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    printf("%d\n",(n*3+m)/2);
    return 0;
}
//  [cpp]
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int a,p;
int main()
{
    while(~scanf("%d%d",&a,&p))
    {
        int x=a*3+p;
        int y=x/2;
        printf("%d\n",y);
    }
}
//  [cpp]
#include<stdio.h>

int main()
{
	int a,p;

	scanf("%d %d",&a,&p);

	int t = (a * 3) + p;

	printf("%d",t / 2);
}
//  [cpp]

#include <bits/stdc++.h>
using namespace std;



int main() {
	int a, p;
	cin >> a >> p;
	p += a * 3;
	for (volatile unsigned long long i = 0; i < 500000000; i++) {
		p++;
	}
	p -= 500000000;
	cout << p / 2 << endl;
	return 0;
}
//  [cpp]
#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <vector>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <climits>
#include <string.h>
#include <cctype>
#include <set>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using namespace std;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

// a と b の最大公約数を返す関数
long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

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

long long lcm(long long a, long long b)
{
	return a * b / gcd(a, b);
}

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	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 { return mint(*this) += a; }
	mint operator-(const mint a) const { return mint(*this) -= a; }
	mint operator*(const mint a) const { return mint(*this) *= a; }
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const { return pow(mod - 2); }
	mint& operator/=(const mint a) { return *this *= a.inv(); }
	mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x; }
ostream& operator<<(ostream& os, const mint& a) { return os << a.x; }

struct combination {
	vector<mint> fact, ifact;
	combination(int n) :fact(n + 1), ifact(n + 1) {
		fact[0] = 1;
		for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
		ifact[n] = fact[n].inv();
		for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
	}
	mint operator()(int n, int k) {
		if (k < 0 || k > n) return 0;
		return fact[n] * ifact[k] * ifact[n - k];
	}
} comb(2000005);

mint g(int r, int c) {
	return comb(r + c + 2, r + 1) - 1;
}

bool comp(int i, int j) {
	return i > j;
}

bool compare_by_b(pair<int, int> a, pair<int, int> b) {
	return a.second < b.second;
}
vector<vector<int>> dd;

int main()
{
	int a, p;
	cin >> a >> p;
	cout << ((3 * a + p) / 2);
}
//  [c]
#include <stdio.h>

int main(void) {
	int N,M,i,j,a,b,c;

    scanf("%d %d",&a,&b);
    
    a = a*3;
    b = a + b;
    N = b / 2;
    printf("%d",N);
	return 0;
}
//  [c]
#include <stdio.h>

int main(void)
{
	int a;
	int p;
	int i;
	
	scanf("%d %d", &a, &p);
	i = a * 3 + p;
	i = i / 2;
	printf("%d", i);
	
	return 0;
}
//  [c]
#include<stdio.h>

int main(){
  int a;
  int p;
  
  scanf("%d %d",&a,&p);
  
  printf("%d",(3*a + p) / 2);
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int a, p;
    
    scanf("%d%d", &a, &p);
    
    printf("%d", (3*a+p)/2);
    
    return 0;
}
//  [c]
#include <stdio.h>
     
int main() {
    int a, p;	
    scanf("%d %d", &a, &p);
    printf("%d", (3 * a + p) / 2);
    return 0;
}
//  [c]
#include <stdio.h>
int main (){
	
	int a, p;
	scanf("%d %d", &a, &p);
	
	int slice = a*3;
	int totalSlice = slice + p;
	int total = totalSlice/2;
	printf ("%d", total);
	
	return 0;
}
//  [javascript]
var arg = args();
var a = parseInt(arg[0]) * 3;
var p = parseInt(arg[1]);

outl(Math.floor((a + p) / 2));

function args() {
	return  require("fs").readFileSync("/dev/stdin", "utf8").split(" ");
}
function out(msg) {
    process.stdout.write(msg);
}
function outl(msg) {
    process.stdout.write(msg + "\n");
}
//  [javascript]
var input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
var obj = {
  "list" : input,
  "index" : 0,
  "max" : input.length,
  "next" : function(){
    if(!this.hasNext()){throw "NoSuchElementException:次に要素は無いよ";}
    var returnObj = this.list[this.index];
    this.index++;
    return returnObj;
  },
  "hasNext" : function(){return (this.index < this.max);}
}
Main();
function next(){return obj.next();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
function hasNext(){return obj.hasNext();}
function myout(t){console.log(t);}//標準出力
function myerr(t){console.error(t);}//標準エラー出力
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す　1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main(){
  var one = nextIntArray();
  var A = one[0];
  var P = one[1];
  myout(Math.floor((A * 3 + P) / 2));
}
//  [javascript]
function Main(input){
var A = input.split(" ")[0];
A = parseInt(A,10);
var P = input.split(" ")[1];
P = parseInt(P,10);

var p = A * 3 + P;
var pie = p / 2;
pie = Math.floor(pie);
console.log(pie);




    
}





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

// read lines from stdin
const input = require("fs")
  .readFileSync("/dev/stdin", "utf8")
  .split(" ");

const A = parseInt(input[0], 10);
const P = parseInt(input[1], 10);

const parts = (A * 3) + P;

console.log(Math.floor(parts / 2));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.split("\n");
    tmp0 = input[0].split(" ");
    A = Number(tmp0[0]);
    P = Number(tmp0[1]);

    console.log(Math.floor((P + A*3)/2))
  }
  //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//   Main("32 21\n");
//  [javascript]
function Main(input) {
	tmp = input.split(" ");
	var a = parseInt(tmp[0]);
	var p = parseInt(tmp[1]);
	var r = 0;
	p += a * 3;
	r = parseInt(p / 2);
	console.log(r);
}

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

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

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

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

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

func main() {
	A, P := nextInt(), nextInt()
	fmt.Println((A*3 + P) / 2)
}

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

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

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

func pow(p, q int) int {
	res := p
	if q == 0 {
		return 1
	}
	for i := 0; i < q-1; i++ {
		res *= p
	}
	return res
}

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

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

func gcdof2numbers(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcdof2numbers(b, a%b)
}

func lcmof2numbers(a int, b int) int {
	return a / gcdof2numbers(a, b) * b
}

// マイナスの場合は考慮していない
func fuctorial(a int) int {
	if a == 1 || a == 0 {
		return 1
	} else {
		return fuctorial(a-1) * a
	}
}

func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}

// 素因数分解したmapを返す
func primeFuctorize(n int) map[int]int {
	pf := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			pf[i]++
			n /= i
		}
	}
	if n != 1 {
		pf[n]++
	}
	return pf
}
//  [go]
package main

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

func solve() {
	a, p := getInt(), getInt()
	kakera := a*3 + p

	ans := kakera / 2
	fmt.Fprintln(wr, ans)
}

// -----------------------------------------

const (
	inf = 1 << 60
	// mod = 1000000007
)

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

func main() {
	maxBufSize := int(1e8)
	sc.Buffer(make([]byte, 4096), maxBufSize)
	sc.Split(bufio.ScanWords)
	solve()
	wr.Flush()
}

func getInt() (ret int) {
	sc.Scan()
	ret, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return
}

func getIntSlice(n int) (ret []int) {
	ret = make([]int, n)
	for i := range ret {
		ret[i] = getInt()
	}
	return
}

func getString() (ret string) {
	sc.Scan()
	ret = sc.Text()
	return
}

func getRunes() (ret []rune) {
	ret = []rune(getString())
	return
}
//  [go]
package main

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

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

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

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

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

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

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

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

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	A, P := getInt(), getInt()
	P += A * 3
	out(P / 2)
}
//  [go]
package main

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

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*1)

func main() {
	list := getStdinIntArr()
	A := list[0]
	P := list[1]

	P += A * 3
	fmt.Printf("%d\n", P/2)

}

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 1024*1024*10)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [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 = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	a, p := intScanner(), intScanner()
	fmt.Println((a*3 + p) / 2)
}
//  [go]
package main

import (
	"fmt"
)

func main() {

	var A, P int
	fmt.Scanf("%d %d", &A, &P)

	P += 3 * A
	fmt.Println(P / 2)
}
//  [ruby]
A, P = gets.split.map(&:to_i)
puts (3*A+P)/2
//  [ruby]
a,b = gets.split.map(&:to_i)
puts((a*3+b)/2)
//  [ruby]
a,b = gets.split.map(&:to_i)
puts "#{(a * 3 + b) /2}"
//  [ruby]
require 'set'; require 'prime'
INF=Float::INFINITY; MOD=10**9+7
a,b = gets.chomp.split.map(&:to_i)

b += a * 3
puts b /2
//  [ruby]
a, p = gets.split.map(&:to_i)

p (a * 3 + p) / 2
//  [ruby]
a,p = gets.chomp.split(' ').map(&:to_i)
puts ((a*3 + p)/2).floor
//  [rust]
fn main() {
    let ap = read_vec::<usize>();
    let sum = ap[0] * 3 + ap[1];
    println!("{}", sum / 2);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}
//  [rust]
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! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: u32,
        p: u32,
    }
    println!("{}", (a * 3 + p) / 2);
}
//  [rust]
use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

use std::cmp::{max, min};

fn main() {
    let a: usize = read();
    let p: usize = read();
    println!("{}", (a * 3 + p) / 2)
}
//  [rust]
#[allow(unused_macros)]
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" ) } ; }
#[allow(unused_macros)]
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 ) * } } ; }
#[allow(unused_macros)]
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 ) * } } ; }

fn main() {
    input! {
        A: i32,
        P: i32,
    }
    let ret = (3 * A + P) / 2;
    println!("{}", ret);
}
//  [rust]
#[allow(unused_imports)]
use proconio::{fastout, input};

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

    println!("{}", (a * 3 + p) / 2);
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let ap = readInts()
    print((ap[0] * 3 + ap[1]) / 2)
}

main()
//  [swift]
let input = readLine()!.split(separator: " ").map { Int($0)! }

let A = input[0]
let P = input[1]

print((A * 3 + P) / 2)
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
//    func enumerated() -> [(Int, Element)] {
//        return self.enumerate()
//    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}
//func gcd(x: Int, _ y: Int) -> Int {
//    if y == 0 {
//        return x
//    } else {
//        return gcd(y, x%y)
//    }
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (A, P) = (input[0], input[1])
print((A*3+P)/2)
//  [typescript]
'use strict'
const main = (input: string) => {
    const [a, p] = input.split(' ').map(Number)
    const r = Math.floor((a*3 + p) / 2)
    console.log(r)
}
main(require('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 min = (...a) => {return Math.min(...a)}
const rep = (n, callback) => {for(let i = 0;i < n; i++){callback()}}

const main = () => {
  let [a,b] = [...nrin(2)];
  out(floor(((a*3+b)/2)));
}
main();
//  [typescript]
import * as fs from 'fs';

//in
// 1 3
//out
// 3 = (3+3)/2
const main = (inp: string) => {
    const [a, p]: number[] = inp.split(' ').map(Number);
    console.log(Math.floor((a * 3 + p) / 2));
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
const log = console.log;

// ----

function Main(input: string): void {
  const [a, p] = input
    .trim()
    .split(/\s/g)
    .map(s => parseInt(s));

  const totalPieceCount = 3 * a + p;
  const pieCount = totalPieceCount >>> 1;

  log(pieCount);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
{
  const process = (a: number, p: number): number => {
    const kakera = a * 3 + p
    return Math.floor(kakera / 2)
  }

  const Main = (input: string): string => {
    const a: string[] = input.split(" ")
    const na: number[] = a.map((e) => parseInt(e))

    const res = process(na[0], na[1]) + ""
    console.log(res)
    return res
  }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"))
}
//  [python]
#
import sys
import math
import numpy as np
import itertools

# ひとつ入力
n = int(input())

print(n*n)
//  [python]
import sys
input = sys.stdin.readline

import numpy as np

def main():
    n = int(input())

    print(n**2)


if __name__ == '__main__':
    main()