jiahuimbzuai/CoQuIR huggingface dataset:
//  [typescript]
import { readFileSync } from 'fs'

const gcd = (a: number, b: number): number => b ? gcd(b, a % b) : a

function main(input: string) {
  const [n, ...numbers] = input.trim().split(/\s+/).map(Number)

  numbers.sort((a, b) => a - b)

  let current = Infinity
  let set = new Set<number>()

  for (const v of numbers) {
    set = new Set(
      Array.from(set.values()).map(value => gcd(value, v))
    )

    set.add(current)

    current = gcd(current, v)
  }

  console.log(Math.max(...Array.from(set.values())))
}

main(readFileSync('/dev/stdin', 'utf8').trim())
//  [typescript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

class AtCoder {
    main(inputs: Array<string>){
        const input: Array<string> = inputs;
        this.answer(input);
    }

    answer(input: Array<string>): void {
        const N: number = parseInt(input[0]);
        const A: Array<number> = input[1].split(" ").map(s => parseInt(s));

        const L: Array<number> = A
            .reduce((p: Array<number>, c: number): Array<number> => {
                if (p.length === 0) {
                    p.push(this.gcd(c, c));
                } else {
                    p.push(this.gcd(p.slice(-1)[0], c));
                }
                return p;
            }, []);

        const R: Array<number> = A
            .reverse()
            .reduce((p: Array<number>, c: number): Array<number> => {
                if (p.length === 0) {
                    p.push(this.gcd(c, c));
                } else {
                    p.push(this.gcd(p.slice(-1)[0], c));
                }
                return p;
            }, []);

        let gcd_arr: Array<number> = [];
        for (let i = 0; i < N; i++) {
            if (i === 0) {
                gcd_arr.push(R.slice(-2)[0]); 
            } else if (i === N - 1) {
                gcd_arr.push(L.slice(-2)[0]);
            } else {  
                gcd_arr.push(this.gcd(L[i - 1], R[N - 2 - i])); 
            }
        }
        
        console.log(gcd_arr.reduce((p, c) => p < c ? c : p, 0));
    }

    private gcd(a: number, b: number): number{
        if (a > b) {
            const c = a;
            a = b;
            b = c;
        }

        if (a === 0) {
            return b;
        }
        
        return this.gcd(b % a, a);
    }
}

let g_input: string = '';
process.stdin.on('data', chunk => { g_input += chunk; });
process.stdin.on('end', () => {
    (new AtCoder()).main(g_input.split(/\r?\n/));
});
//  [python]
#
import sys
import math
import numpy as np
import itertools


# いくつか入力
a, b, t = (int(i) for i in input().split())  

print(b* (t//a))
//  [python]
import numpy as np

s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])+0.5

w = np.floor(c/a)*b

print(int(w))
//  [python]
import numpy as np

if __name__ == "__main__":
    a, b, t = map(int, input().split())
    print(b * (t // a))
//  [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);
		int[] list = Stream.of(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
		int A = list[0];
		int B = list[1];
		int T = list[2];
		int result=0;
		
		result = (int) ((T+0.5)/A)*B;
		
		System.out.println(result);
	}
}
//  [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);

        int[] nums = Stream.of(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();

        int a = nums[0];
        int b = nums[1];
        int t = nums[2];

        int cnt = t / a;
        System.out.println(cnt * b);
    }
}
//  [java]
import java.util.*;

public class Main implements Runnable {

    private static int MOD = 1_000_000_007;

    public static void main(String[] args) {
        // Run with 32MB stack
        Thread thread = new Thread(null, new Main(), "", 32 * 1024 * 1024);
        thread.start();
    }

    @Override
    public void run() {
        final Scanner scanner = new Scanner(System.in);
        solve(scanner);
    }

    static void solve(Scanner scanner) {
        int[] n = Arrays.stream(scanner.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        System.out.println(n[2] / n[0] * n[1]);
    }

}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define str string
#define sec .second

ll MOD = 1000000007,INFL = 1ll << 60,INF = 1 << 30;
pair<ll,ll> A[10000000] = {};
ll X[1000000] = {};
ll aiti[10000];
int dy[]={0, 0, 1, -1},dx[]={1, -1, 0, 0};
vector <ll> v;
ll a = 0,b = 0,c = 0,n = 0,sum = 0, max = INF;
str S;
int ans = 0;

int findDigits(int n) {
        int i = 0;
        while (n > 0) {

                sum += n%10;
                n /= 10;
                i++;
        }
        return i;
}


int main(){
        cin.tie(0);
        ios::sync_with_stdio(false);
        //Code Line
cin >> a >> b >> c;

cout << c / a * b << endl;
  //Code Line
        return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define all(a) (a).begin(),(a).end()
#define vecin(a) rep(i,a.size())cin >> a[i]
#define vecout(a) rep(i,a.size()){cout << a[i];cout << (i == a.size() - 1 ? "\n":" ");}
#define rep(i,x) for(ll i = 0;i<x;i++)
#define REP(i,x) for(ll i = 1;i<=x;i++)
#define mp make_pair
#define debug(x) cerr << #x << ": " << x << "\n"
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll inf = 2147483647;
const ll INF = 1LL << 60;
const dou pi = 3.14159265358;
const ll mod = 1000000007LL;
//const ll mod = 998244353LL;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T, class U> inline bool chmin(T& a, const U& b){ if(a > b){ a = b; return 1; } return 0; }
template<class T, class U> inline bool chmax(T& a, const U& b){ if(a < b){ a = b; return 1; } return 0; }
template<class T, class U> inline bool change(T& a,U& b){if(a > b){swap(a,b);return 1;}return 0;}
//0の場合のアレンジに注意
template<class T>
T gcd(T a,T b){
    if(a == 0)return b;
    else if(b == 0)return a;
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
template<class T>
T lcm(T a,T b){
    return a / gcd(a,b) * b;
}

//素数判定O(sqrt(N))
template<class T>
inline bool isp(T n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}
const ll cmax = 1000000;
vector<ll> fac(cmax),finv(cmax),inv(cmax);

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < cmax; i++){
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}

// 二項係数計算
ll nCk(ll n, ll k){
    if(fac[0] == 0)COMinit();
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
//nのm乗をMODで割ったあまりO(logm)
ll modpow(ll n,ll m,ll MOD){
    if(m == 0)return 1;
    if(m < 0)return -1;
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n) % MOD;
        m >>= 1;
        n *= n;
        n %= MOD;
    }
    return res;
}
ll mypow(ll n,ll m){
    if(m == 0)return 1;
    if(m < 0)return -1;
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n);
        m >>= 1;
        n *= n;
    }
    return res;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    ll A,B,T;
    cin >> A >> B >> T;
    cout << T / A * B << "\n";
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(){
    int a, b, t;
    scanf("%d%d%d", &a, &b, &t);
    printf("%d\n", b*(t/a));
}
//  [c]
#include <stdio.h>

int main()
{
	int A, B, T;
	scanf("%d %d %d", &A, &B, &T);
	printf("%d\n", T / A * B);
	fflush(stdout);
	return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int a,b,t;

	scanf("%d%d%d",&a,&b,&t);

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

    const result = Math.floor(T / A) * B;

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

import (
	"fmt"
)

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

	fmt.Println(b * (t / a))
}
//  [go]
package main

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

const BUFSIZE = 10000000

var rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE)

func main() {
	var a, b, t int
	fmt.Scanf("%d %d %d", &a, &b, &t)

	fmt.Println(b * int(math.Floor(float64(t/a))))
}

func NextLineInt() []int {
	buf := make([]byte, 0, BUFSIZE)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}

		buf = append(buf, l...)

		if !p {
			break
		}
	}
	str := strings.Split(string(buf), " ")
	l := len(str)

	ret := make([]int, l)

	for i := range str {
		// ret[i], ok = strconv.Atoi(str[i])
		v, ok := strconv.Atoi(str[i])

		if ok == nil {
			ret[i] = v
		}
	}

	return ret
}

func Bool2Int(b bool) int {
	if b {
		return 1
	} else {
		return 0
	}
}

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

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

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

func Distance(a, b int) int {
	return Abs(a - b)
}
//  [ruby]
a,b,t = gets.chomp.split(" ").map(&:to_i)
puts t/a * b
//  [ruby]
a,b,t = gets.chomp.split(' ').map(&:to_i)
i = 1
sum = 0
while i*a < t + 0.5
  sum += b
  i += 1
end
puts sum
//  [ruby]
a,b,c=gets.split.map &:to_i
puts b*(c/a)
//  [rust]
use proconio::{input, fastout};

#[fastout]
fn main() {
    input!{
	a: usize,
        b: usize,
        t: usize,
    }
    let ret = b * (t / a);
    println!("{}", ret);
}
//  [rust]
use proconio::*;

fn main() {
    input! {
        a: i32,
        b: i32,
        t: i32
    };
    println!("{}", (t / a) * b);
}
//  [rust]
use proconio::input;

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

    let mut ans = 0;
    for i in 1..=t {
        if i % a == 0 {
            ans += b;
        }
    }
    println!("{}", ans);
}
//  [typescript]
process.stdin.resume();
process.stdin.setEncoding("utf8");
function A(input: number[]): number {
    const a = input[0];
    const b = input[1];
    const t = input[2];
    return (((t + 0.5) / a) << 0) * b;
}

let input: string = "";
process.stdin.on("data", chunk => {
    input += chunk;
});
process.stdin.on("end", chunk => {
    console.log(A(input.split(" ").map(v => parseInt(v, 10))));
});
//  [typescript]
var main = (str) => {
	var [A,B,T] = str.split(" ").map(Number)
    console.log(Math.floor(T/A) * B)
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [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 strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};
const main = ()=>{
  let [a, b, t] = [...nrin(3)];
  out(floor(t/ a)*b);
}
main();
//  [python]
let = input()

if let == 'a' or let == "i" or let == "u" or let == "e" or let == "o" :
    result = "vowel"
else:
    result = "consonant"
    
print(result)
//  [python]
List=["a","i","u","e","o"]
n=input()
if n in List:
  print("vowel")
else:
  print("consonant")
//  [python]
c = input()
aaa = ['a','e','i','o','u']
print('vowel'if c in aaa else 'consonant')
//  [python]
print 'vowel' if raw_input() in 'aeiou' else 'consonant'
//  [python]
import numpy as np

c = input()
boin_list = ['a','e','i','o','u']
if c in boin_list:
    print ('vowel')
else: print ('consonant')
//  [python]
"""
author : halo2halo
date : 2, Feb, 2020
"""

import sys
import itertools

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8').rstrip()
vowel = 'aiueo'

print('vowel' if S in vowel else 'consonant')
//  [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 s = sc.next();
		
		// 計算
		String result = "consonant";
		if(s.equals("a") || s.equals("i") || s.equals("u") || s.equals("e") || s.equals("o")) result = "vowel";
		
		// 出力
		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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    char c;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        c = sc.next().charAt(0);
        solve();
    }

    void solve() {
        if (c == 'a' || c =='e' || c == 'i' || c == 'o' || c == 'u') {
            System.out.println("vowel");
        } else {
            System.out.println("consonant");
        }
    }

    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.util.*;
class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);
    char[] consonne = new char[]{'a','e','i','o','u','y'};

    char lettre = scan.next().charAt(0);

    boolean appartient = false;

    for (int i = 0; i < consonne.length; i++){

      if (lettre == consonne[i]){
        appartient = true;
      }

    }

    if (appartient)
      System.out.println("vowel");
    else{
      System.out.println("consonant");
    }



  }

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

public class Main {
	public static void main (String[] args) {
		Scanner scanner = new Scanner(System.in);
		String c = scanner.next();
		if (c.equals("a") || c.equals("e") || c.equals("i") || c.equals("u") || c.equals("o")) {
			System.out.println("vowel");
		}else {
			System.out.println("consonant");
		}
	}
}
//  [cpp]
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(void)
{
	int a,s,d;
	char z[2];
	scanf("%s",z);
	if(z[0]=='a'||z[0]=='i'||z[0]=='u'||z[0]=='e'||z[0]=='o')
		printf("vowel\n");
	else
		printf("consonant\n");
	return 0;
}
//  [cpp]
#include<cstdio>
int main()
{
	char c;
	scanf("%c",&c);
	if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') printf("vowel\n");
	else printf("consonant\n");
	return 0;
}
//  [cpp]
#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
	char c[2], s[6] = "aeiou";
	scanf("%s", c);
	if(find(s, s + 5, c[0]) != s + 5) puts("vowel");
	else puts("consonant");
	return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main()
{
    char c;
    while(cin>>c)
    {
        if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
            printf("vowel\n");
        else printf("consonant\n");
    }
    return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
 
int main(){
    char c;
    cin>>c;
    if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o' ) cout<<"vowel"<<endl;
    else cout<<"consonant"<<endl;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair

typedef pair<int, int> pii;
typedef long long ll;



int main() {
#ifdef LOCAL                       
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  char c;
  cin >> c;
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
    cout << "vowel";
  } else {
    cout << "consonant";
  }
  return 0;
}
//  [c]
#include <stdio.h>

int main(){
  char input;
  
  scanf("%c",&input);
  
  switch(input){
    case 'a':
    case 'i':
    case 'u':
    case 'e':
    case 'o':
      printf("vowel");
      break;
    default:
      printf("consonant");
  }
}
//  [c]
#include <stdio.h>

int main(void)

{
	char c;
	scanf("%c",&c);
	
	if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
		printf("vowel\n");
	} else{
		printf("consonant\n");
	}
	return 0;
}
//  [c]
#include <stdio.h>

int main(void){
  char c;
  scanf("%c",&c);
  if(c=='a') printf("vowel\n");
  else if(c=='i') printf("vowel\n");
  else if(c=='u') printf("vowel\n");
  else if(c=='e') printf("vowel\n");
  else if(c=='o') printf("vowel\n");
  else printf("consonant\n");
  return(0);
}
//  [c]
#include<stdio.h>

int main()
{
    char ch;
    scanf("%c", &ch);
    if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') printf("vowel");
    else printf("consonant");
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    char c[2];

    scanf("%s", c);

    if(c[0] == 'a' || c[0] == 'e' || c[0] == 'i' || c[0] == 'o' || c[0] == 'u'){
        printf("vowel\n");
    }else{
        printf("consonant\n");
    }

    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
    char c;
    scanf("%c",&c);
    if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
        printf("vowel\n");
    else
        printf("consonant\n");
 
    return 0;
}
//  [javascript]
"use strict";
const Main = (input) =>{
	let xs = input.trim().split(' ');
    if(xs[0]=="a"||xs[0]=="i"||xs[0]=="u"||xs[0]=="e"||xs[0]=="o"){
    console.log("vowel");
    }else{
    console.log("consonant");
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [javascript]
function main(input) {
  input=input.trim();
  const op = input.split(" ")[0];
  if(op=="a"||op=="e"||op=="i"||op=="o"||op=="u"){
    console.log("vowel");
  }else{
    console.log("consonant");
  }

}



main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(a){
	var reg=/[aiueo]/;
	(reg.test(a))?op("vowel"):op("consonant");
}
function op(a){
	console.log(a);
}
function stn(a){
		return a.map(function(x){return parseInt(x,10);});
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

const main = input => {
	const c = input.trim()
	if (c === 'a') console.log('vowel')
	else if (c === 'e') console.log('vowel')
	else if (c === 'i') console.log('vowel')
	else if (c === 'o') console.log('vowel')
	else if (c === 'u') console.log('vowel')
	else console.log('consonant')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function main(input) {
  input = input.trim();
  const a = input.split(' ');
  if(a[0]=='a'||a[0]=='i'||a[0]=='u'||a[0]=='e'||a[0]=='o'){
    console.log('vowel');
  }else{
    console.log('consonant');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict'
const main = arg => {
	const input = arg.trim().split("\n");
	let c = input[0].split(' ')[0]
	const vowel = 'aiueo'.split('')
	if(vowel.some(v => v === c)) {
		console.log('vowel')
	} else {
		console.log('consonant')
	}
}   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
  "fmt"
)

func main() {
  vowels := make(map[rune]bool)
  for _, c := range "aeiou" {vowels[c] = true}
  var c string; fmt.Scan(&c)
  var ans string
  if _, ok := vowels[rune(c[0])]; ok {ans = "vowel"} else {ans = "consonant"}
  fmt.Println(ans)
}
//  [go]
package main

import (
	"fmt"
)

func main() {

	var c string
	fmt.Scan(&c)

	if c == "a" || c == "i" || c == "u" || c == "e" || c == "o" {
		fmt.Println("vowel")
	} else {
		fmt.Println("consonant")
	}
}
//  [go]
package main

import "fmt"

func main() {

	var s string
	fmt.Scan(&s)

	slice := []string{"a", "i", "u", "e", "o"}

	ans := "consonant"

	for i := 0; i < 5; i++ {
		if s == slice[i] {
			ans = "vowel"
		}
	}

	fmt.Println(ans)
}
//  [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)
	c := Scanner()
	if c == "a" || c == "i" || c == "u" || c == "e" || c == "o" {
		fmt.Println("vowel")
	} else {
		fmt.Println("consonant")
	}
}
//  [ruby]
puts [?a, ?i, ?u, ?e, ?o].include?(gets.chomp) ? 'vowel' : 'consonant'
//  [ruby]
puts 'aiueo'.match(gets[0]) ? 'vowel' : 'consonant'
//  [ruby]
c = gets.chomp
if c.match(/^(a|e|i|o|u)$/)
  puts "vowel"
else
  puts "consonant"
end
//  [ruby]
require 'set'; require 'prime'
INF=Float::INFINITY; MOD=10**9+7
c = gets.chomp

if "aiueo".split(//).include?(c)
  puts 'vowel'
else
  puts 'consonant'
end
//  [ruby]
c = gets.chomp

puts ["a", "i", "u", "e", "o"].include?(c) ? "vowel" : "consonant"
//  [ruby]
x = %w(a i u e o)
s = gets.chomp
puts x.include?(s) ? "vowel" : "consonant"
//  [rust]
use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let s = buf.trim();
	if s == "a" || s == "e" || s == "i" || s == "o" || s == "u" {
		println!("vowel");
	}else{
		println!("consonant");
	}
}
//  [rust]
use std::collections::HashSet;
use std::io::stdin;

fn main() {
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    let s = s.trim();
    let set: HashSet<&str> = ["a", "e", "i", "o", "u"].iter().cloned().collect();

    println!(
        "{}",
        if set.contains(s) {
            "vowel"
        } else {
            "consonant"
        }
    );
}
//  [rust]
use text_io::*;
use std::collections::HashMap;
use std::process::exit;

fn main() {
    let a:String = read!();
    if a=="a"||a=="i"||a=="u"||a=="e"||a=="o" {
        println!("vowel");
        exit(0);
    }
    println!("consonant");
}
//  [rust]
#![allow(unused_imports)]
// use itertools::Itertools;
use proconio::{input, marker::*};

fn main() {
    input! {
        c: char
    };
    let v = vec!['a', 'i', 'u', 'e', 'o'];
    println!("{}", if v.contains(&c) { "vowel" } else { "consonant" });
}
//  [rust]
use text_io::read;

fn main() {
    let c: char = read!();

    match c {
        'a' | 'i' | 'u' | 'e' | 'o' => println!("vowel"),
        _ => println!("consonant"),
    }

}
//  [swift]
let c=readLine()!;print(c=="a"||c=="e"||c=="i"||c=="o"||c=="u" ?"vowel":"consonant")
//  [swift]
import Foundation

let target = ["a","i","u","e","o"]

func main() {
	let input = readLine()!
	let result = target.contains(input)
	print(result ? "vowel" : "consonant")
}

main()
//  [typescript]
import * as fs from "fs"

function Main(input: string) {

  const vowels: string[] = ["a", "i", "u", "e", "o"]

  const c = input.split("\n")[0]

  if (vowels.indexOf(c) > -1) {
    console.log("vowel")
  }
  else {
    console.log("consonant")
  }

}


fs.readFile('/dev/stdin', (err, data) => {
  if (err) {
    Main(fs.readFileSync('./input.txt', 'utf8'))
    return null
  }
  Main(data.toString())
  return null
})
//  [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 = ()=>{
  out(sw(sin(),[
    'a', 'vowel',
    'e', 'vowel',
    'i', 'vowel',
    'o', 'vowel',
    'u', 'vowel',
    'consonant'
  ]))
}
main()
//  [typescript]
var input: string = require('fs').readFileSync('/dev/stdin', 'utf8');
var inputLines: string[] = input.trim().split("\n");
var parts = inputLines[0].split(" ");

var vowels = ["a", "i", "u", "e", "o"];
var c = parts[0];
console.log(vowels.some(vowel => vowel == c) ? "vowel" : "consonant");
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const c = input[0][0];

  return "aiueo".includes(c) ? "vowel" : "consonant";
};

console.log(main(read()));
//  [typescript]
const main = (input) => {
  input = input.trim();
  input = input.split(' ');
  const c = input[0];
  
  if (c=="a"||c=="e"||c=="i"||c=="o"||c=="u") {
      console.log("vowel");
      }else{
      console.log("consonant");
      }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const c = stdin.split('\n')[0]

const res = _ => {
  const v = ['a','i','u','e','o']
  return v.indexOf(c) > -1 ? 'vowel' : 'consonant'
}

console.log(res())
//  [python]
N = int(input())
x_u = [input().split() for _ in range(N)]
otoshidama = []

for i in range(N):
    if x_u[i][1] == "JPY":
        otoshidama.append(eval(x_u[i][0]))
    else:
        otoshidama.append(eval(x_u[i][0])*380000.0)
        
print(sum(otoshidama))
//  [python]
# 入力
N = int(input())
x, u = zip(*((float(t[0]), t[1]) for t in (input().split() for _ in range(N))))

# 定義通り計算
ans = sum(
    t[0] if t[1] == 'JPY' else
    380000 * t[0] for t in zip(x, u)
)

# 出力
print(ans)
//  [python]
#!/usr/bin/env python3
N = int(input()) #input -> str
ans = 0
for i in range(N):
	x, u = input().split()
	x = float(x)
	if u == "JPY":
		ans += x
	else:
		ans += x * 380000
print(ans)
//  [python]
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

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


from collections import defaultdict, Counter
import math
from bisect import bisect_left, bisect_right
import numpy as np

N = int(input())
x = []
u = []

for _ in range(N):
    li = input().split()
    x.append(float(li[0]))
    u.append(li[1])

ans = 0
for x_i, u_i in zip(x, u):
    if u_i == "JPY":
        ans += x_i
    else:
        ans += x_i*380000.0

print(ans)
//  [python]
# -*- coding: utf-8 -*-
import numpy as np
N = int(input())
x = np.zeros(N)
u = []
for i in range(N):
  xx, uu = input().split()
  x[i] = float(xx)
  u.append(uu)

sum = 0.0
for i in range(N):
  if(u[i] == 'JPY'):
    sum += x[i]
  else:
    sum += x[i]*380000.0

print(sum)
//  [python]
import numpy as np
N = int(input())
table = np.array([[i for i in input().split()] for _ in range(N)])

vals = table[:, 0].astype(float)
conts = table[:, 1]

rates = (conts == "JPY") * 1 + (conts == "BTC") * 380000
s = (vals * rates).sum()
print(s)
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String args[]) {
		FastScanner scanner = new FastScanner();
		int n=scanner.nextInt();
		double ans=0;
		for(int i=0;i<n;i++){
			double x=scanner.nextDouble();
			String u=scanner.next();
			if(u.equals("JPY")){
				ans+=x;
			}else{
				ans+=380000*x;
			}
		}
		System.out.println(ans);
	}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		double[] x = new double[N];
		String[] u = new String[N];
		for (int i = 0; i < N; i++) {
			x[i] = sc.nextDouble();
			u[i] = sc.next();
		}
		double s = 0;
		for (int i = 0; i < N; i++) {
			if (u[i].equals("JPY"))
				s += x[i];
			else
				s += x[i] * 380000;
		}
		System.out.println(s);

	}
	//以下、自作ライブラリ

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

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

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

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

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

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

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

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

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

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

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

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

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

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        double sum = IntStream.range(0, n).mapToDouble(i -> {
            String x = scan.next();
            String u = scan.next();
            double total = 0;
            if ("BTC".equals(u)) {
                total += Double.parseDouble(x) * 380000;
            } else {
                total += Integer.parseInt(x);
            }
            return total;
        }).sum();
        System.out.println(sum);
    }
}
//  [java]
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    private static final BigDecimal BTC_TO_JPY_CONVERT_RATIO = new BigDecimal("380000.0");

    public static String process(TestCase testCase) {
        int N = testCase.N;
        BigDecimal sum = BigDecimal.ZERO;

        final List<BigDecimal> x = testCase.x;
        final List<String> u = testCase.u;
        for (int i = 0; i < N; ++i) {
            final String currency = u.get(i);
            final BigDecimal value = x.get(i);
            BigDecimal valueInJPY = Currency.fromString(currency).asJPY(value);
            sum = sum.add(valueInJPY);
        }

        return sum.toPlainString();
    }

    private static enum Currency {
        JPY(BigDecimal.ONE), BTC(BTC_TO_JPY_CONVERT_RATIO);

        private final BigDecimal toJpyConvertRatio;

        Currency(BigDecimal toJpyConvertRatio) {
            this.toJpyConvertRatio = toJpyConvertRatio;
        }

        public BigDecimal asJPY(BigDecimal value) {
            return value.multiply(toJpyConvertRatio);
        }

        public static Currency fromString(String possibleCurrency) {
            return Arrays.stream(values())
                    .filter(currency -> currency.name().equals(possibleCurrency))
                    .findFirst()
                    .orElseThrow(() -> new IllegalArgumentException("Unknown Currency: " + possibleCurrency));
        }
    }

    // Util func

    public static void main(String[] args) {
        TestCase testCase = readFromInput();

        final String result = process(testCase);

        output(result);
    }

    private static TestCase readFromInput() {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        List<BigDecimal> x = new ArrayList<>();
        List<String> u = new ArrayList<>();
        for (int i = 0; i < N; ++i) {
            x.add(new BigDecimal(sc.next()));
            u.add(sc.next());
        }

        sc.close();
        return new TestCase(N, x, u);
    }

    private static void output(String result) {
        System.out.println(result);
    }

    public static class TestCase {
        final int N;
        final List<BigDecimal> x;
        final List<String> u;

        public TestCase(int N, final List<BigDecimal> x, final List<String> u) {
            this.N = N;
            this.x = x;
            this.u = u;
        }
    }
}
//  [java]
import java.math.BigDecimal;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int count = scanner.nextInt();
			scanner.nextLine();
			BigDecimal rate = new BigDecimal("380000.0");
			System.out.println(IntStream.range(0, count).mapToObj(i -> {
				String amount = scanner.next();
				String currency = scanner.next();
				scanner.nextLine();
				if ("JPY".equals(currency)) {
					return new BigDecimal(amount);
				} else {
					return (new BigDecimal(amount)).multiply(rate);
				}
			}).reduce(BigDecimal.ZERO, BigDecimal::add));
		}
	}
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main()
{
    double a=0,b=0;
    int n;
    double x;
    string s;
    scanf("%d",&n);
    while(n--)
    {
        cin>>x>>s;
        if(s=="JPY") a+=x;
        else b+=x;
    }
    cout<<a+b*380000<<endl;
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<map>
#include<stack>
#include<queue>
#include<bitset>

#define ipair pair<int,int>
#define rep(i,n) for(i=0;i<n;i++)

using namespace std;

typedef long long int lli;
typedef long long ll;
typedef vector<int> vi;

int main() {
	long double ans,x;
	int n, i, j;
	string u;

	cin >> n;

	ans = 0;
	rep(i, n) {
		cin >> x >> u;
		if (u == "JPY")
			ans += x;
		else
			ans += x * 380000;
	}

	cout << ans;

	return 0;
}
//  [cpp]
// template version 1.6
// {{{ define basic macro
using namespace std;
#include <iostream>
#include <bits/stdc++.h>
// varibable settings
#define int long long
#define INF 1000000000000000000LL
// #define INF 2147483647
#define MOD 1000000007LL
// #define MOD 998244353LL
#define infile "../test/sample-1.in"

#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _rrep(i,n) rrepi(i,0,n)
#define rrepi(i,a,b) for(int i=(int)(b-1);i>=(int)(a);--i)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define uni(x) sort(all(x));x.erase(unique(all(x)),x.end())
#define ten(n) ((int)1e##n)
template<class T, size_t N> size_t sza(const T (&array)[N]) { return N; }
template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; }
template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; }
template<class T=int> T in() {T x; cin>>x; return (x);}
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

// dump macro
#ifdef PCM
  #include "dump.hpp"
#else
  #define dump(...) 42
  #define dump_1d(...) 42
  #define dump_2d(...) 42
#endif

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> iii;
template<typename T> using PQ = priority_queue<T, vector<T>, greater<T>>;
int dx[]={1, -1, 0, 0};
int dy[]={0, 0, 1, -1};
#define fi first
#define se second

// }}}

int solve(){
  int n;cin>>n;
  double res = 0;
  rep(i, n){
    double v;cin>>v;
    string t;cin>>t;
    res += v * (t=="JPY"?1.0:380000.0);
  }
  // cout << res << endl;
  printf("%06f", res);

  return 0;
}

signed main() { //{{{
#ifdef INPUT_FROM_FILE
  std::ifstream in(infile);
  std::cin.rdbuf(in.rdbuf());
#endif
  solve();
  return 0;
} //}}}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

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

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vs = vector<string>;
using vd = vector<double>;
using ul = unsigned long;

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

const int mod=1e9+7;

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

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

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

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

    return true;
}

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

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

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

  int n;
  cin>>n;
  
  vd x(n);
  vs u(n);
  rep(i,n){
    cin>>x[i];
    cin>>u[i];
  }
  
  double ans=0;
  double btc=380000.0;
  rep(i,n){
    if(u[i]=="BTC")ans+=x[i]*btc;
    else ans+=x[i];
  }

  coutd(ans);

  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  long double J=0,B=0;
  for(int i=0;i<N;i++){
    long double X;
    string S;
    cin>>X>>S;
    if(S=="JPY"){
      J+=X;
    }
    else{
      B+=X;
    }
  }
  B*=380000.0;
  B+=J;
  cout<<fixed<<setprecision(15);
  cout<<B<<endl;
}