let a=Int(readLine()!)!
var s : [String] = []
//var anag : [Character:Int] = [:]
//var chars : [[Character]] = []
var hashchar : [String:Int] = [:]
//var anaglist : [[Character:Int]] = []
//var kotae : [[Character:Int]:Int] = []
var tmps : String

var o = 0

for var i  in 0..<a {
  //s.append(readLine()!)
  //var arr2 = Array(readLine()!.characters )
  //arr2 = arr2.sort()
  tmps = String( readLine()!.characters.sort() )
  //print( String(arr2) )

  //print(chars)
  /*
  for var j in 0..<arr2.count {
    if(  anag[arr2[j]] == nil ) {
      anag[arr2[j]] = 1
    } else {
      anag[arr2[j]] = (anag[arr2[j]])! + 1
    }
  }*/

  //print( hashchar[String(arr2)] )
  if( hashchar[tmps] == nil ) {
    hashchar[tmps] = 0
  } else {
    var tmp = ( hashchar[tmps] )! + 1
    hashchar[tmps] = tmp
    o += tmp
  }

  //var z = 0

  //chars.append(arr2)
  //anaglist.append( anag )

  //print( anag )
  //anag = [:]
}
/*
for var k in 0..<anaglist.count {
  for var x in k+1..<(anaglist.count) {
    if( anaglist[x] == anaglist[k] ){
      o += 1
    }
  }
}
*/

print( o )


import Foundation
import CoreFoundation

#if swift(>=4.0)
prefix operator *
infix operator **: PowerPrecedence
precedencegroup PowerPrecedence {
    higherThan: MultiplicationPrecedence
    lowerThan: BitwiseShiftPrecedence
    associativity: right
}
#else
extension String {
    func split(separator separator: Character) -> [String] {
        return self.characters.split(separator).map{String($0)}
    }
    var count: Int {
        return self.characters.count
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) -> [Element] {
        return self.sort(areInIncreasingOrder)
    }
    mutating func sort(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) {
        self.sortInPlace(areInIncreasingOrder)
    }
}
extension Array {
    mutating func swapAt(i: Int, _ j: Int) {
        swap(&self[i], &self[j])
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func reverse() {
        self = self.reversed()
    }
    func enumerated() -> EnumerateSequence<[Element]> {
        return self.enumerate()
    }
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
extension _ArrayType where Generator.Element == String {
    func joined(separator separator: String = "") -> String {
        return self.joinWithSeparator(separator)
    }
}
extension Range {
    func reversed() -> [Element] {
        return self.reverse()
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
prefix operator * { }
infix operator ** {
    precedence 155      // 乗除算より強く，ビットシフトより弱い
    associativity right // 右結合
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: Character = " ") -> [String] {
    return readLine()!.split(separator: separator).map{String($0)}
}
func readIntSplit(by separator: Character = " ") -> [Int] {
    return readLine()!.split(separator: separator).map{Int($0)!}
}
prefix func * <T> (a: [T]) -> (T, T)             { return (a[0], a[1]) }
prefix func * <T> (a: [T]) -> (T, T, T)          { return (a[0], a[1], a[2]) }
prefix func * <T> (a: [T]) -> (T, T, T, T)       { return (a[0], a[1], a[2], a[3]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T)    { return (a[0], a[1], a[2], a[3], a[4]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T, T) { return (a[0], a[1], a[2], a[3], a[4], a[5]) }
func **(lhs: Int, rhs: Int) -> Int {
//    return (0..<rhs).reduce(1){i,_ in i*lhs}
    return Int(pow(Double(lhs), Double(rhs)))

}
func **(lhs: Int, rhs: Double) -> Double {
    return pow(Double(lhs), rhs)
}
func * <Element> (lhs: [Element], rhs: Int) -> [Element] {
    return (0..<rhs).reduce([]){a,_ in a+lhs}
}
func *(lhs: String, rhs: Int) -> String {
    return (0..<rhs).reduce(""){s,_ in s+lhs}
}
//func gcd(x: Int, _ y: Int) -> Int {
//    return y>0 ? gcd(y, x%y) : x
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}
let MOD = 10 ** 9 + 7

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

//arr.sort{$0.0==$1.0 ? $0.1<$1.1 : $0.0<$1.0}  // タプル配列のソート

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

let N = readInt()!
var S = [String: Int]()
for _ in 0..<N {
    let s = String(readLine()!.characters.sort())
    S[s] = (S[s] ?? 0) + 1
}
print(S.reduce(0){$0+(1..<$1.1).reduce(0){$0+$1}})


import Foundation
import CoreFoundation

#if swift(>=4.0)
prefix operator *
infix operator **: PowerPrecedence
precedencegroup PowerPrecedence {
    higherThan: MultiplicationPrecedence
    lowerThan: BitwiseShiftPrecedence
    associativity: right
}
#else
extension String {
    func split(separator separator: Character) -> [String] {
        return self.characters.split(separator).map{String($0)}
    }
    var count: Int {
        return self.characters.count
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) -> [Element] {
        return self.sort(areInIncreasingOrder)
    }
    mutating func sort(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) {
        self.sortInPlace(areInIncreasingOrder)
    }
}
extension Array {
    mutating func swapAt(i: Int, _ j: Int) {
        swap(&self[i], &self[j])
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func reverse() {
        self = self.reversed()
    }
    func enumerated() -> EnumerateSequence<[Element]> {
        return self.enumerate()
    }
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
extension _ArrayType where Generator.Element == String {
    func joined(separator separator: String = "") -> String {
        return self.joinWithSeparator(separator)
    }
}
extension Range {
    func reversed() -> [Element] {
        return self.reverse()
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
prefix operator * { }
infix operator ** {
    precedence 155      // 乗除算より強く，ビットシフトより弱い
    associativity right // 右結合
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: Character = " ") -> [String] {
    return readLine()!.split(separator: separator).map{String($0)}
}
func readIntSplit(by separator: Character = " ") -> [Int] {
    return readLine()!.split(separator: separator).map{Int($0)!}
}
prefix func * <T> (a: [T]) -> (T, T)             { return (a[0], a[1]) }
prefix func * <T> (a: [T]) -> (T, T, T)          { return (a[0], a[1], a[2]) }
prefix func * <T> (a: [T]) -> (T, T, T, T)       { return (a[0], a[1], a[2], a[3]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T)    { return (a[0], a[1], a[2], a[3], a[4]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T, T) { return (a[0], a[1], a[2], a[3], a[4], a[5]) }
func **(lhs: Int, rhs: Int) -> Int {
//    return (0..<rhs).reduce(1){i,_ in i*lhs}
    return Int(pow(Double(lhs), Double(rhs)))

}
func **(lhs: Int, rhs: Double) -> Double {
    return pow(Double(lhs), rhs)
}
func * <Element> (lhs: [Element], rhs: Int) -> [Element] {
    return (0..<rhs).reduce([]){a,_ in a+lhs}
}
func *(lhs: String, rhs: Int) -> String {
    return (0..<rhs).reduce(""){s,_ in s+lhs}
}
//func gcd(x: Int, _ y: Int) -> Int {
//    return y>0 ? gcd(y, x%y) : x
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}
let MOD = 10 ** 9 + 7

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

//arr.sort{$0.0==$1.0 ? $0.1<$1.1 : $0.0<$1.0}  // タプル配列のソート

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

let N = readInt()!
var S = [String: Int]()
for _ in 0..<N {
    let s = String(readLine()!.characters.sort())
    S[s] = (S[s] ?? 0) + 1
}
print(S.reduce(0){$0+($1*($1-1))>>1})


import Foundation
import CoreFoundation

#if swift(>=4.0)
prefix operator *
infix operator **: PowerPrecedence
precedencegroup PowerPrecedence {
    higherThan: MultiplicationPrecedence
    lowerThan: BitwiseShiftPrecedence
    associativity: right
}
#else
extension String {
    func split(separator separator: Character) -> [String] {
        return self.characters.split(separator).map{String($0)}
    }
    var count: Int {
        return self.characters.count
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) -> [Element] {
        return self.sort(areInIncreasingOrder)
    }
    mutating func sort(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) {
        self.sortInPlace(areInIncreasingOrder)
    }
}
extension Array {
    mutating func swapAt(i: Int, _ j: Int) {
        swap(&self[i], &self[j])
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func reverse() {
        self = self.reversed()
    }
    func enumerated() -> EnumerateSequence<[Element]> {
        return self.enumerate()
    }
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
extension _ArrayType where Generator.Element == String {
    func joined(separator separator: String = "") -> String {
        return self.joinWithSeparator(separator)
    }
}
extension Range {
    func reversed() -> [Element] {
        return self.reverse()
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
prefix operator * { }
infix operator ** {
    precedence 155      // 乗除算より強く，ビットシフトより弱い
    associativity right // 右結合
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: Character = " ") -> [String] {
    return readLine()!.split(separator: separator).map{String($0)}
}
func readIntSplit(by separator: Character = " ") -> [Int] {
    return readLine()!.split(separator: separator).map{Int($0)!}
}
prefix func * <T> (a: [T]) -> (T, T)             { return (a[0], a[1]) }
prefix func * <T> (a: [T]) -> (T, T, T)          { return (a[0], a[1], a[2]) }
prefix func * <T> (a: [T]) -> (T, T, T, T)       { return (a[0], a[1], a[2], a[3]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T)    { return (a[0], a[1], a[2], a[3], a[4]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T, T) { return (a[0], a[1], a[2], a[3], a[4], a[5]) }
func **(lhs: Int, rhs: Int) -> Int {
//    return (0..<rhs).reduce(1){i,_ in i*lhs}
    return Int(pow(Double(lhs), Double(rhs)))

}
func **(lhs: Int, rhs: Double) -> Double {
    return pow(Double(lhs), rhs)
}
func * <Element> (lhs: [Element], rhs: Int) -> [Element] {
    return (0..<rhs).reduce([]){a,_ in a+lhs}
}
func *(lhs: String, rhs: Int) -> String {
    return (0..<rhs).reduce(""){s,_ in s+lhs}
}
//func gcd(x: Int, _ y: Int) -> Int {
//    return y>0 ? gcd(y, x%y) : x
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}
let MOD = 10 ** 9 + 7

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

//arr.sort{$0.0==$1.0 ? $0.1<$1.1 : $0.0<$1.0}  // タプル配列のソート

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

let N = readInt()!
var S = [String: Int]()
for _ in 0..<N {
    let s = String(readLine()!.characters.sort())
    S[s] = (S[s] ?? 0) + 1
}
print(S.reduce(0){$0+($1*($1-1)/2)})


import Foundation
import CoreFoundation

#if swift(>=4.0)
prefix operator *
infix operator **: PowerPrecedence
precedencegroup PowerPrecedence {
    higherThan: MultiplicationPrecedence
    lowerThan: BitwiseShiftPrecedence
    associativity: right
}
#else
extension String {
    func split(separator separator: Character) -> [String] {
        return self.characters.split(separator).map{String($0)}
    }
    var count: Int {
        return self.characters.count
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) -> [Element] {
        return self.sort(areInIncreasingOrder)
    }
    mutating func sort(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) {
        self.sortInPlace(areInIncreasingOrder)
    }
}
extension Array {
    mutating func swapAt(i: Int, _ j: Int) {
        swap(&self[i], &self[j])
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func reverse() {
        self = self.reversed()
    }
    func enumerated() -> EnumerateSequence<[Element]> {
        return self.enumerate()
    }
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
extension _ArrayType where Generator.Element == String {
    func joined(separator separator: String = "") -> String {
        return self.joinWithSeparator(separator)
    }
}
extension Range {
    func reversed() -> [Element] {
        return self.reverse()
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
prefix operator * { }
infix operator ** {
    precedence 155      // 乗除算より強く，ビットシフトより弱い
    associativity right // 右結合
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: Character = " ") -> [String] {
    return readLine()!.split(separator: separator).map{String($0)}
}
func readIntSplit(by separator: Character = " ") -> [Int] {
    return readLine()!.split(separator: separator).map{Int($0)!}
}
prefix func * <T> (a: [T]) -> (T, T)             { return (a[0], a[1]) }
prefix func * <T> (a: [T]) -> (T, T, T)          { return (a[0], a[1], a[2]) }
prefix func * <T> (a: [T]) -> (T, T, T, T)       { return (a[0], a[1], a[2], a[3]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T)    { return (a[0], a[1], a[2], a[3], a[4]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T, T) { return (a[0], a[1], a[2], a[3], a[4], a[5]) }
func **(lhs: Int, rhs: Int) -> Int {
//    return (0..<rhs).reduce(1){i,_ in i*lhs}
    return Int(pow(Double(lhs), Double(rhs)))

}
func **(lhs: Int, rhs: Double) -> Double {
    return pow(Double(lhs), rhs)
}
func * <Element> (lhs: [Element], rhs: Int) -> [Element] {
    return (0..<rhs).reduce([]){a,_ in a+lhs}
}
func *(lhs: String, rhs: Int) -> String {
    return (0..<rhs).reduce(""){s,_ in s+lhs}
}
//func gcd(x: Int, _ y: Int) -> Int {
//    return y>0 ? gcd(y, x%y) : x
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}
let MOD = 10 ** 9 + 7

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

//arr.sort{$0.0==$1.0 ? $0.1<$1.1 : $0.0<$1.0}  // タプル配列のソート

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

let N = readInt()!
var S = [String: Int]()
for _ in 0..<N {
    let s = String(readLine()!.characters.sort())
    S[s] = (S[s] ?? 0) + 1
}
print(S.reduce(0){$0+$1*($1-1)/2})


const stdin = require('fs').readFileSync('/dev/stdin', 'utf8').trim()

const n = Number(stdin.split('\n')[0])
const [_, ...s] = stdin.split('\n')

const ans = () => {
  let res = 0

  let sortedList = []
  for (let i = 0; i < n; i++) {
    const str = s[i]

    const sorted = str
      .split('')
      .sort()
      .join('')

    sortedList.push(sorted)
  }

  let obj = {}
  for (let i = 0; i < n; i++) {
    const str = sortedList[i]

    obj[str] = obj[str] === undefined ? 0 : obj[str] + 1

    res += obj[str]
  }

  console.log(res)
}

ans()


'use strict'
function main(input: string) {
    const std = input.split('\n');
    const n: number = Number(std[0]);
    const s: string[] = std.slice(1).map(v => v.split('').sort().join(''));
    let r = 0;
    let tmp = new Map();
    s.forEach(v => {
        if (tmp.has(v)) {
            r += tmp.get(v);
            tmp.set(v, tmp.get(v)+1);
        } else {
            tmp.set(v, 1);
        }
    })
    console.log(r);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
  input = input.trim().split("\n");
  const n = Number(input[0]);
  const ss = input.slice(1);
  const map = {};
  for (let i = 0; i < n; i++) {
    const char = ss[i];
    const sortedChar = char.split("").sort().join("");
    if (!map[sortedChar]) {
      map[sortedChar] = 1;
      continue;
    }
    map[sortedChar]++;
  }
  let result = 0;
  Object.keys(map).forEach(key => {
    const num = map[key];
    if (num !== 1) {
      result += combination(num, 2);
    }
  });
  console.log(result);
}
function permutation(n, r) {
for(var i = 0, res = 1; i < r; i++) {
res *= n - i;
}
return res;
}

function combination(n, r) {
return permutation(n, r) / permutation(r, r);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


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[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.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[]=>{return Array.from(new Set(a))};
const main=()=>{
  let n=tn()
  let sr=[],c=0
  for(let i=0;i<n;i++){
    sr.push(ts().split('').sort().join(''))
  }
  sr=sr.sort()
  for(let i=0;i<n-1;i++){
    if(sr[i]==sr[i+1])c++
    if(i!=0){
      if(sr[i]==sr[i+1]&&sr[i]==sr[i-1]){
        c++
      }
    }
  }
  to(c)
}
main()


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[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.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[]=>{return Array.from(new Set(a))};
const main=()=>{
  let n=tn()
  let sr=[],c=0
  for(let i=0;i<n;i++){
    sr.push(ts().split('').sort().join(''))
  }
  sr=sr.sort()
  to(sr)
  for(let i=0;i<n-1;i++){
    if(sr[i]==sr[i+1])c++
    if(i!=0){
      if(sr[i]==sr[i+1]&&sr[i]==sr[i-1]){
        c++
      }
    }
  }
  to(c)
}
main()


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[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.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[]=>{return Array.from(new Set(a))};
const main=()=>{
  let n=tn()
  let sr=[],c=0
  for(let i=0;i<n;i++){
    sr.push(ts().split('').sort().join(''))
  }
  // for(let i=0;i<n-1;i++){
  //   for(let j=i+1;j<n;j++){
  //     if(sr[i]==sr[j])c++
  //   }
  // }
  to(c)
}
main()


a = list(map(int,input().split())) #input from array of integer like "1 2 3"

if a[0]>12:
  ans = a[1]
elif a[0]>5:
  ans = a[1]/2
else:
  ans = 0

print(int(ans))


A,B=map(int,input().split())
if A>=13:
  print(B)
elif A<=5:
  print(0)
else:
  print(int(B/2))


from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

if a >= 13:
  print(b)
elif a >= 6 and a <= 12:
  print(b//2)
else:
  print(0)


if a>=13:
  print(b)
elif a>=6 and a<=12:
  print(int(b/2))
else:
  print(0)


a, b = int(input))
if a <= 5:
    print(0)
elif a <= 12:
    print(b//2)
else:
    print(b)


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

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] ab = br.readLine().split(" ");
        int a = Integer.parseInt(ab[0]);
        int b = Integer.parseInt(ab[1]);
        System.out.println(problem127a(a, b));
    }

    private static int problem127a(int a, int b) {
        if (a >= 13) {
            return b;
        } else if (a <= 5) {
            return 0;
        }
        return (b / 2);
    }
}


// Working program using Reader Class
import java.io.*;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

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

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

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

		public String readLine() throws IOException
		{
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();

			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}

	public static long power(long l, long m,long p)
    {
		//long p=mod;
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        l = l % p;

        while (m > 0)
        {
            // If y is odd, multiply x
            // with result
            if((m & 1)==1)
                res = (res * l) % p;

            // y must be even now
            // y = y / 2
            m = m >> 1;
            l = (l * l) % p;
        }
        return (long)res;
    }

	public static long mod=998244353;

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

	public static long modMult(long a,long b) {
		return ((a%mod)*(b%mod))%mod;
	}

	public static long modAdd(long a,long b) {
		return ((a%mod)+(b%mod))%mod;
	}

	public static void main(String[] args) throws IOException
	{
		Reader scan=new Reader();
		PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
		int n=scan.nextInt();
		int k=scan.nextInt();
		if(n<=5) {
			out.print(0);
		}
		else if(n>=13) {
			out.print(k);
		}
		else {
			out.print(k/2);
		}
		out.close();
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
import java.lang.Math;

public class Main {
	public static void main(String[] args) {
		FS reader = new FS();
		// write reader
		int a = reader.nextInt();
		int b = reader.nextInt();
      	if (a <= 5) b = 0;
        else if (a <= 12) b /= 2;
      	System.out.println(b);
	}

	public static void solver() {
		// write logic
	}

	// Read Class
	static class FS {
		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() { return hasNextByte() ? buffer[ptr++] : -1;}
		private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
		private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}

		public boolean hasNext() { skipUnprintable(); 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 int nextInt() {
			return (int)nextLong();
		}
		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();
			}
		}
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner  = new Scanner(System.in);
		final var r = scanner.nextInt();
		final var D = scanner.nextInt();
		var x = scanner.nextInt();
		for(int i = 0; i < 10; i++) {
			x =  r * x - D;
			System.out.println(x);
		}
		scanner.close();
	}

}


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

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

        if (a<6)
            System.out.println("0");
        else if (a<13)
            System.out.println("b/2");
        else
            System.out.println(b);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class Main {

    void solve() throws IOException {
        int A = ni();
        int B = ni();
        if(A>=13) out.println(B);
        else if(A>=6) out.println(B/2);
        else put.println(0);
    }

    final int mod = 1000000007;
    final BigInteger MOD = BigInteger.valueOf(mod);
    int upperBound(ArrayList<Long> list, Long target){
        int i = Collections.binarySearch(list, target, new UpperBoundComparator<Long>());
        return ~i;
    }
    class UpperBoundComparator<T extends Comparable<? super T>> implements Comparator<T>{
        public int compare(T x, T y){
            return (x.compareTo(y) > 0) ? 1 : -1;
        }
    }
    int lowerBound(ArrayList<Long> list, Long target){
        int i = Collections.binarySearch(list, target, new LowerBoundComparator<Long>());
        return ~i;
    }
    class LowerBoundComparator<T extends Comparable<? super T>> implements Comparator<T>{
        public int compare(T x, T y){
            return (x.compareTo(y) >= 0) ? 1 : -1;
        }
    }
    int mul(int x, int y){
        int val = (int)((x * 1L * y) % mod);
        return val>=0 ? val : val+mod;
    }
    int add(int x, int y) {
        x += y;
        if(x < 0) x += mod;
        if(x>=mod) x -= mod;
        return x;
    }
    int sub(int x, int y){
        x = add(x,mod-y);
        if(x < 0) x += mod;
        if(x>=mod) x -= mod;
        return x;
    }
    String ns() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine(), " ");
        }
        return tok.nextToken();
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String[] nsa(int n) throws IOException {
        String[] res = new String[n];
        for (int i = 0; i < n; i++) {
            res[i] = ns();
        }
        return res;
    }

    int[] nia(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = ni();
        }
        return res;
    }

    long[] nla(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = nl();
        }
        return res;
    }

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        tok = new StringTokenizer("");
        Main main = new Main();
        main.solve();
        out.close();
    }
}


#include<cstdio>
using namespace std;

int main(void) {
	int A, B;
	scanf("%d %d", &A, &B);
	if (A >= 13) {
		printf("%d", B);
	} else if (A >= 6) {
		printf("%d", B / 2);
	} else {
		printf("%d", 0);
	}

	return 0;
}


#include<stdio.h>
int main()
{
    int A,B,C;
    scanf("%d%d",&A,&B);
    if(A>=13)
    { C=B;
      printf("%d",B);
    }
    else if(A>=6 && A<=12 )
    {   C=(int)(0.5*B);
        printf("%d",C);
    }
    else
        printf("0");
    return 0;

}


#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;

int main()
{
    int a, b;

    cin >> a >> b;

    if(a >= 13){
        cout << b;
    }
    else if(a >= 6){
        cout << b/2;
    }
    else{
        cout << 0;
    }

    return 0;
}


#include <bits/stdc++.h>
#define MOD (long long)(1E9+7)
#define rep(i, n) for(int i = 0; i < n; i++)

using namespace std;

int main(){
	int a,b;
	cin >> a >> b;
  	if(a>=13) cout << b << endl;
  	else if(a>=5) cout << b/2 << endl;
  	else cout << 0 << endl;
}


#include <iostream>
using namespace std;

int solve(int A, int B) {
    if (A >= 13)
        return B;
    else if (A <= 12)
        return B/2;
    else
        return 0;
}

int main() {
    int A, B;

    cin >> A >> B;

    int answer = solve(A, B);
    cout << answer;

    return 0;
}


#include <iostream>
using namespace std;

int solve(int A, int B) {
    if (A < 6)
        return 0;
    else if (A >= 6)
        return 50;
    else
        return B;
}

int main() {
    int A, B;

    cin >> A >> B;

    int answer = solve(A, B);
    cout << answer;

    return 0;
}


#include <stdio.h>

int main()
{
	int a, b;

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

	if (a >= 13)
		printf("%d", b);
	else if (a >= 6)
		printf("%d", b / 2);
	else
		printf("0");

	return 0;
}


#include<stdio.h>
int main()
{
	int a, b;
	scanf("%d %d", &a, &b);
	if (a >= 13)
		printf("%d\n", b);
	else if (a >= 6)
		printf("%d\n", b / 2);
	else
		printf("0\n");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main(){
  int A; scanf("%d", &A);
  int B; scanf("%d", &B);

  if(A >= 13) printf("%d\n", B);
  else if(A <= 12 && A >= 6) printf("%d\n", B / 2);
  else printf("%d\n", 0);

  return 0;
}


#include<stdio.h>

int main(void){
  int a,b;
  scanf("%d %d",&a,&b);
  if(a>=13){
    printf("%d\n",b);
  }else if(a<=5){
    printf("0\n");
  }else{
    pritnf("%d\n",b/2);
  }
  return 0;
}


#include <stdio.h>
int main(){
	int n, m;
	int a, b;
	int l=0, r;
	scanf("%d %d", &n, &m);
	r = n;
	for (int i = 0; i < m; i++) {
		scanf("%d %d", &a, &b);
		if (l < a)
			l = a;
		if (r > b)
			r = b;
	}
	if (l > r) {
		l = 1;
		r = 0;
	}
	l--;
	printf("%d\n", r - l);
	return 0;
}


#include <stdio.h>
int main(void)
{
    int A,B;
    scanf("%d %d",&A,&B);
    if(B >= 13){
        printf("%d",B);
    }else if(B >= 6){
        printf("%d",B/2);
    }else{
        printf("%d",0);
    }
}


function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
  if(input[0]<=5) console.log(0)
  else if(input[0]<13) console.log(input[1]/2)
  else console.log(input[1])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	input = input.split(" ");
  var A = parseInt(input[0]);
  var B = parseInt(input[1]);
  var result;

  if(13<=A && A<=100) {
    result = B;
  } else if (6<=A && A<=12){
    result = B/2;
  } else if (0<=A && A<=5) {
    result = 0;
  }

  console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"))


function main(input) {
  var age = Number(input.split(' ')[0]);
  var price = Number(input.split(' ')[1]);
  if (age <= 5) {
    console.log(0);
  } else if (age <= 12) {
    console.log(price / 2);
  } else {
    console.log(price);
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
    const args = input.split(' ');
    const a = parseInt(args[0], 10);
    const b = parseInt(args[1], 10);


function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
  if(input[0]<5) console.log(0)
  else if(input[0]<12) console.log(input[1]/2)
  else console.log(input[1])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
  if(input[0]<5) console.log(0)
  else if(input[0]<13) console.log(input[1]/2)
  else console.log(input[1])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
  "fmt"
)

func main() {
  var a, b int
  fmt.Scan(&a, &b)
  if a > 12 {
    fmt.Println(b)
  } else if a > 5 {
    fmt.Println(b / 2)
  } else {
    fmt.Println(0)
  }
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	log.SetFlags(log.Lshortfile)
	a := nextInt()
	b := nextInt()
	ans := -1
	if a >= 13 {
		ans = b
	} else if a >= 6 && a <= 12 {
		ans = b / 2
	} else {
		ans = 0
	}
	fmt.Println(ans)
}

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

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

var dy = []int{0, 1, 0, -1}
var dx = []int{1, 0, -1, 0}
var MAX = math.MaxInt32

func pow(a, b int) int {
	return int(math.Pow(float64(a), float64(b)))
}

func lcm(a, b int) int {
	return a * b / gcd(a, b)
}
func gcd(a, b int) int {
	if a < b {
		a, b = b, a
	}
	for b != 0 {
		a, b = b, a%b
	}
	return a
}
func max(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r < a[i] {
			r = a[i]
		}
	}
	return r
}
func min(a ...int) int {
	r := a[0]
	for i := 0; i < len(a); i++ {
		if r > a[i] {
			r = a[i]
		}
	}
	return r
}
func sum(a []int) (r int) {
	for i := range a {
		r += a[i]
	}
	return r
}
func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

type Pair struct {
	a, b int
}

type Pairs []Pair

func (p Pairs) Len() int {
	return len(p)
}
func (p Pairs) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p Pairs) Less(i, j int) bool {
	if p[i].a == p[j].a {
		return p[i].b < p[j].b
	}
	return p[i].a < p[j].a
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	switch {
	case a <= 5:
		fmt.Println(0)
	case a <= 12:
		fmt.Println(b / 2)
	default:
		fmt.Println(b)
	}
}


package main

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

func main() {
	scan_init()
	a := scanInt()
	b := scanInt()
	if 6 <= a &&  a <= 12 {
		fmt.Println(b/2)
	} else {
		if 5 <= a {
			fmt.Println(0)
		} else {
			fmt.Println(b)
		}
	}
}

var sc = bufio.NewScanner(os.Stdin)

func scan_init() {
	sc.Split(bufio.ScanWords)
}
func scanInt() int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return i
}
func scan() string {
	sc.Scan()
	return sc.Text()
}

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

func readLine() string {
	buf := make([]byte, 0, 200000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
func readLineToNumber() int {
	S := readLine()
	number, _ := strconv.Atoi(S)
	return number
}
func readLineToSlice() []string {
	S := readLine()
	list := strings.Split(S, "")
	return list
}
func readLineToNumberSlice(memo map[string]int) []int {
	// err時は-1を代入
	S := readLine()
	intList := make([]int, len(S))
	for i := 0; i < len(S); i++ {
		if val, ok := memo[string(S[i])]; ok {
			intList[i] = val
		} else {
			intList[i] = -1
		}
	}
	return intList
}


package main

import (
  "fmt"
  "strings"
)

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

  ans := b
  if a < 13 {
    ans = b / 2
  }
  if a < 5 {
    ans = 0
  }
  fmt.Printf("%d\n", ans)
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	switch {
	case a >= 13:
		fmt.Println(b)
	case 6 <= a || a <= 12:
		fmt.Println(b / 2)
	default:
		fmt.Println(0)
	}
}


#
# File    : A.rb
# Author  : Kazune Takahashi
# Created : 2019-5-25 20:54:47
# Powered by Visual Studio Code
#

a, b = gets.chomp.split(" ").map{|i| i.to_i}
if a <= 5
  puts 0
elsif a <= 12
  puts b/2
else
  puts b
end


a,b=gets.split.map(&:to_i)
if a>= 13
  puts b
elsif a>=6
  puts b/2
else
  puts 0
end


line = $stdin.gets.split.map{|v| v.to_i }
A = line[0]
B = line[1]

if A >= 13 then
  puts B
elsif A >= 6 then
  puts B / 2
elsif A
  puts 0
end


A, B = gets.chomp.split.map(&:to_i)
if A >= 13
  puts B
elsif 6 <= A <= 12
  puts B / 2
else
  puts 0
end


a = gets.to_i
b = gets.to_i

if a <= 5
    p 0
  elsif a <= 12
    p b/2
  else
    p b
end


a = gets.to_i
b = gets.to_i

case a
  when 0..5
    puts 0
  when 6..12
    puts b / 2
  else
    puts b
end


fn main() {
    let mut buf= String::new();
    std::io::stdin().read_line(&mut buf).ok();

    let mut line_itr = buf.split_whitespace();
    let a: u8 = line_itr.next().unwrap().parse().unwrap();
    let b: u16 = line_itr.next().unwrap().parse().unwrap();

    println!("{}",
        if a > 12 {
            b
        } else if a > 5 {
            b / 2
        } else {
            0
        }
    )

}


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

#[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! 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! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

use std::cmp;
use std::iter::Iterator;

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

    if a >= 13{
        println!("{}", b)
    }else if a <= 5{
        println!("{}", "0")
    }else{
        println!("{}", b /2)
    }

}


fn main() {
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).ok();
    let mut it = input.trim().split_whitespace();
    let a:u16 = it.next().unwrap().parse().unwrap();
    let b:u16 = it.next().unwrap().parse().unwrap();
    let result = match a {
        e if e < 6 => 0,
        e if e < 13 => b / 2,
        _ => b
    };
    println!("{}",result);
}


use std::cmp::*;
use std::collections::*;
use std::io::*;
use std::str::FromStr;
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")
}
fn main(){
    let a:usize = read();
    let b:usize = read();
    println!("{}",if a <= 5{
        0
    }else if 5 < a && 13 < a{
        b / 2
    }else{
        b
    });
}


#![allow(unused_imports)]

use proconio::{input, fastout};
use proconio::marker::*;

#[fastout]
fn main() {
    input! {
    a: usize,
    b: usize
    }
    let c = if a <= 5 { 0 } else if a > 13
    { b } else { b / 2 };
    println!("{}", c)
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

use std::io::*;
use std::str::FromStr;

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

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

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

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

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

fn 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")
}

fn readu() -> usize {
    read::<usize>()
}

fn readi() -> i32 {
    read::<i32>()
}

fn main () {
    let a = readu();
    let b = readu();

    if a >= 13 {
        println!("{}", b);
    } else if a >= 12 {
        println!("{}", b / 2);
    } else {
        println!("{}", 0);
    }
}


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

func main() {
    let ab = readInts()
    let a = ab[0]
    let b = ab[1]

    if a >= 13 {
        print(b)
    } else if a >= 6 {
        print(b / 2)
    } else {
        print("0")
    }
}

main()


let input = readLine()!.split(separator: " ").map { Int($0)! }

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

if A >= 13 {
  print(B)
} else if A >= 6 {
  print(B / 2)
} else {
  print(0)
}


import Foundation

let input_line = readLine()!

let split = input_line.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let age = Int(split[0])!
let price = Int(split[1])!
var returnPrice = 0

if age > 12 {
	returnPrice = price
} else if 6 <= age && age <= 12 {
  	returnPrice = price / 2
}

print(returnPrice)


var A=Int(readLine()!)!
var B=Int(readLine()!)!
if A <= 5
print("0")
else if A >= 13
print(B)
else
print(B/2)


//あってるか分からないけどひとまずテスト

import Foundation

var input_lines = [String]()
let row = 2
for i in 0..<row {
    input_lines.append(readLine()!)
}

let a = Int(input_lines[0])!
let b = Int(input_lines[1])!
//let a = Int(split[0])!
//let b = Int(split[1])!

if a >= 13{
    print(b)
}else if a < 13 && a >= 6{
    print(b/2)
}else{
    print("0")
}


import Foundation

extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
}

// main
let ab = readIntSplit(by: " ")
var (a, b, ans) = (ab[0], ab[1], 0)
if 5 < a && a <= 12 {
    ans = b/2
} else if 12 < a {
    ans = b
}
print(ans)


((input: string): void => {
    const [a, b] = input.split(" ").map(Number);
    console.log(a>=13 ? b : (a>=6 ? b/2 : 0));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

const main = (inp: string) => {

    const [a, b]: number[] = inp.split(' ').map(Number);

    // 13才以上B円
    // 6才以上12才以下半額
    // 5才以下無料
    if (a >= 13) {
        console.log(b);
    } else if(a >=6 && a <=12 ) {
        console.log(b/2);
    } else {
        console.log(0);
    }

};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


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=[];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 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)];
  if(a >= 13) out(b)
  else if(a >= 6) out(b/2)
  else out(0);
}
main();


const main = (input: string) => {
  let [r, D, x] = input.trim().split(" ").map(str => parseInt(str))
  const OUTPUT_LINE = 10;
  let answer: string = "";

  for (let i = 0; i < OUTPUT_LINE; i++) {
    answer = `${answer}${r * x - D}\n`;
    x = r * x - D
  }

  console.log(answer.trim());
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);
const nin=()=>{const r = input[0];input.shift();return Number(r);}
const sin=()=>{const r = input[0];input.shift();return String(r);}
const out = (...a) => {console.log(...a);}
const rep = (n, callback) => {for(let i = 0;i < n; i++){callback();}}

const main = () => {
  let [n, i, p, before] = [0, 0, 0, -1];
  const a = [];
  const b = [];
  const c = [];
  n = nin();
  rep(n, ()=>a.push(nin()));
  rep(n, ()=>b.push(nin()));
  rep(n-1, ()=>c.push(nin()));
  for(i=0;i<n;i++){
    a[i]-=1;
    p += b[a[i]];
    if(a[i] == before + 1 && before != -1) p+= c[before];
    before = a[i];
  }
  out(p);
}
main();


import math

N = int(input())

def gcd(a, b):
    while b: a, b = b, a % b
    return a

def isPrimeMR(n):
    d = n - 1
    d = d // (d & -d)
    L = [2]
    for a in L:
        t = d
        y = pow(a, t, n)
        if y == 1: continue
        while y != n - 1:
            y = (y * y) % n
            if y == 1 or t == n - 1: return 0
            t <<= 1
    return 1

def findFactorRho(n):
    m = 1 << n.bit_length() // 8
    for c in range(1, 99):
        f = lambda x: (x * x + c) % n
        y, r, q, g = 2, 1, 1, 1
        while g == 1:
            x = y
            for i in range(r):
                y = f(y)
            k = 0
            while k < r and g == 1:
                ys = y
                for i in range(min(m, r - k)):
                    y = f(y)
                    q = q * abs(x - y) % n
                g = gcd(q, n)
                k += m
            r <<= 1
        if g == n:
            g = 1
            while g == 1:
                ys = f(ys)
                g = gcd(abs(x - ys), n)
        if g < n:
            if isPrimeMR(g): return g
            elif isPrimeMR(n // g): return n // g
            return findFactorRho(g)

def primeFactor(n):
    i = 2
    ret = {}
    rhoFlg = 0
    while i*i <= n:
        k = 0
        while n % i == 0:
            n //= i
            k += 1
        if k: ret[i] = k
        i += 1 + i % 2
        if i == 101 and n >= 2 ** 20:
            while n > 1:
                if isPrimeMR(n):
                    ret[n], n = 1, 1
                else:
                    rhoFlg = 1
                    j = findFactorRho(n)
                    k = 0
                    while n % j == 0:
                        n //= j
                        k += 1
                    ret[j] = k

    if n > 1: ret[n] = 1
    if rhoFlg: ret = {x: ret[x] for x in sorted(ret)}
    return ret

pfacts = primeFactor(N)
ans = 0
for p, e in pfacts.items():
    i = math.floor((-1 + math.sqrt(1 + 8 * e)) / 2)
    ans += i
print(ans)


def gcd(a, b):
    while b: a, b = b, a % b
    return a
def isPrimeMR(n):
    d = n - 1
    d = d // (d & -d)
    L = [2, 7, 61] if n < 1<<32 else [2, 3, 5, 7, 11, 13, 17] if n < 1<<48 else [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
    for a in L:
        t = d
        y = pow(a, t, n)
        if y == 1: continue
        while y != n - 1:
            y = y * y % n
            if y == 1 or t == n - 1: return 0
            t <<= 1
    return 1
def findFactorRho(n):
    m = 1 << n.bit_length() // 8
    for c in range(1, 99):
        f = lambda x: (x * x + c) % n
        y, r, q, g = 2, 1, 1, 1
        while g == 1:
            x = y
            for i in range(r):
                y = f(y)
            k = 0
            while k < r and g == 1:
                ys = y
                for i in range(min(m, r - k)):
                    y = f(y)
                    q = q * abs(x - y) % n
                g = gcd(q, n)
                k += m
            r <<= 1
        if g == n:
            g = 1
            while g == 1:
                ys = f(ys)
                g = gcd(abs(x - ys), n)
        if g < n:
            if isPrimeMR(g): return g
            elif isPrimeMR(n // g): return n // g
            return findFactorRho(g)
def primeFactor(n):
    i = 2
    ret = {}
    rhoFlg = 0
    while i * i <= n:
        k = 0
        while n % i == 0:
            n //= i
            k += 1
        if k: ret[i] = k
        i += i % 2 + (3 if i % 3 == 1 else 1)
        if i == 101 and n >= 2 ** 20:
            while n > 1:
                if isPrimeMR(n):
                    ret[n], n = 1, 1
                else:
                    rhoFlg = 1
                    j = findFactorRho(n)
                    k = 0
                    while n % j == 0:
                        n //= j
                        k += 1
                    ret[j] = k

    if n > 1: ret[n] = 1
    if rhoFlg: ret = {x: ret[x] for x in sorted(ret)}
    return ret
def sqrt(n):
    x = 1 << (n.bit_length() + 1) // 2
    y = (x + n // x) // 2
    while y < x:
        x = y
        y = (x + n // x) // 2
    return x
def calc(k):
    return (sqrt(8*k+1) - 1) // 2

N  = int(input())
pf = primeFactor(N)
print(sum([calc(pf[p]) for p in pf]))


import random

def primesbelow(N):
    # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
    #""" Input N>=6, Returns a list of primes, 2 <= p < N """
    correction = N % 6 > 1
    N = {0:N, 1:N-1, 2:N+4, 3:N+3, 4:N+2, 5:N+1}[N%6]
    sieve = [True] * (N // 3)
    sieve[0] = False
    for i in range(int(N ** .5) // 3 + 1):
        if sieve[i]:
            k = (3 * i + 1) | 1
            sieve[k*k // 3::2*k] = [False] * ((N//6 - (k*k)//6 - 1)//k + 1)
            sieve[(k*k + 4*k - 2*k*(i%2)) // 3::2*k] = [False] * ((N // 6 - (k*k + 4*k - 2*k*(i%2))//6 - 1) // k + 1)
    return [2, 3] + [(3 * i + 1) | 1 for i in range(1, N//3 - correction) if sieve[i]]

smallprimeset = set(primesbelow(100000))
_smallprimeset = 100000
def isprime(n, precision=7):
    # http://en.wikipedia.org/wiki/Miller-Rabin_primality_test#Algorithm_and_running_time
    if n < 1:
        raise ValueError("Out of bounds, first argument must be > 0")
    elif n <= 3:
        return n >= 2
    elif n % 2 == 0:
        return False
    elif n < _smallprimeset:
        return n in smallprimeset

    d = n - 1
    s = 0
    while d % 2 == 0:
        d //= 2
        s += 1

    for repeat in range(precision):
        a = random.randrange(2, n - 2)
        x = pow(a, d, n)

        if x == 1 or x == n - 1: continue

        for r in range(s - 1):
            x = pow(x, 2, n)
            if x == 1: return False
            if x == n - 1: break
        else: return False

    return True

# https://comeoncodeon.wordpress.com/2010/09/18/pollard-rho-brent-integer-factorization/
def pollard_brent(n):
    if n % 2 == 0: return 2
    if n % 3 == 0: return 3

    y, c, m = random.randint(1, n-1), random.randint(1, n-1), random.randint(1, n-1)
    g, r, q = 1, 1, 1
    while g == 1:
        x = y
        for i in range(r):
            y = (pow(y, 2, n) + c) % n

        k = 0
        while k < r and g==1:
            ys = y
            for i in range(min(m, r-k)):
                y = (pow(y, 2, n) + c) % n
                q = q * abs(x-y) % n
            g = gcd(q, n)
            k += m
        r *= 2
    if g == n:
        while True:
            ys = (pow(ys, 2, n) + c) % n
            g = gcd(abs(x - ys), n)
            if g > 1:
                break

    return g

smallprimes = primesbelow(1000) # might seem low, but 1000*1000 = 1000000, so this will fully factor every composite < 1000000
def primefactors(n, sort=False):
    factors = []

    for checker in smallprimes:
        while n % checker == 0:
            factors.append(checker)
            n //= checker
        if checker > n: break

    if n < 2: return factors

    while n > 1:
        if isprime(n):
            factors.append(n)
            break
        factor = pollard_brent(n) # trial division did not fully factor, switch to pollard-brent
        factors.extend(primefactors(factor)) # recurse to factor the not necessarily prime factor returned by pollard-brent
        n //= factor

    if sort: factors.sort()

    return factors

def factorization(n):
    factors = {}
    for p1 in primefactors(n):
        try:
            factors[p1] += 1
        except KeyError:
            factors[p1] = 1
    return factors

totients = {}
def totient(n):
    if n == 0: return 1

    try: return totients[n]
    except KeyError: pass

    tot = 1
    for p, exp in factorization(n).items():
        tot *= (p - 1)  *  p ** (exp - 1)

    totients[n] = tot
    return tot

def gcd(a, b):
    if a == b: return a
    while b > 0: a, b = b, a % b
    return a

def lcm(a, b):
    return abs((a // gcd(a, b)) * b)
l=[0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0]
N=int(input())
choice=0
x=0
ans=0
dic=factorization(N)

for key in dic.keys():
  ans+=l[dic[key]]
print(ans)


import sys

N = int(input())
# a,b = map(int,sys.stdin.readline().split())
# arr= list(map(int,sys.stdin.readline().split()))

n= int(1000000000000 ** 0.5)
a = [False,False] + [True]*(n-1)
primes=[]

for i in range(2,n+1):
  if a[i]:
    primes.append(i)
    for j in range(2*i, n+1, i):
        a[j] = False

ans_dict = {}

# 1일 경우
if N == 1:
    print(0)
    exit()
else:
    i=0
    while N!=1:
        try:
            if N%primes[i] == 0:
                N = N//primes[i]
                if primes[i] in ans_dict:
                    ans_dict[primes[i]] +=1
                else:
                    ans_dict[primes[i]] = 1
            else:
                i+=1
        except:
            print(1)
            exit()
    ans = 0
    for i in ans_dict:
        m = ans_dict[i]
        j = 1
        while m-j >= 0:
            m -= j
            j+=1
            ans+=1
    print(ans)


import sys

N = int(input())
# a,b = map(int,sys.stdin.readline().split())
# arr= list(map(int,sys.stdin.readline().split()))

n= int(1000000000000 ** 0.5)
a = [False,False] + [True]*(n-1)
primes=[]

for i in range(2,n+1):
  if a[i]:
    primes.append(i)
    for j in range(2*i, n+1, i):
        a[j] = False

ans_dict = {}

# 1일 경우
if N == 1:
    print(0)
    exit()
else:
    i=0
    while N>1:
        if N%primes[i] == 0:
            N = N//primes[i]
            if primes[i] in ans_dict:
                ans_dict[primes[i]] +=1
            else:
                ans_dict[primes[i]] = 1
        else:
            i+=1
    ans = 0
    for i in ans_dict:
        m = ans_dict[i]
        j = 1
        while m-j >= 0:
            m -= j
            j+=1
            ans+=1
    print(ans)


import sys

N = int(input())
# a,b = map(int,sys.stdin.readline().split())
# arr= list(map(int,sys.stdin.readline().split()))

n= int(N ** 0.5)
a = [False,False] + [True]*(n-1)
primes=[]

for i in range(2,n+1):
  if a[i]:
    primes.append(i)
    for j in range(2*i, n+1, i):
        a[j] = False

ans_dict = {}

# 1일 경우
if N == 1:
    print(0)
    exit()
else:
    i=0
    while N!=1:
        try:
            if N%primes[i] == 0:
                N = N//primes[i]
                if primes[i] in ans_dict:
                    ans_dict[primes[i]] +=1
                else:
                    ans_dict[primes[i]] = 1
            else:
                i+=1
        except:
            print(1)
            exit()
    ans = 0
    for i in ans_dict:
        m = ans_dict[i]
        j = 1
        while m-j >= 0:
            m -= j
            j+=1
            ans+=1
    print(ans)


/// 5:50 PM 01/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class Main {
    public static long getSteps(long n) {
        long i = 0;
        long sum = 0;
        while (sum <= n) {
            i++;
            sum += i;
        }
        i -= 1;
        return i;
    }

    public static void main(String[] args) throws IOException {
        FastScanner fastScanner = new FastScanner();
        long n = fastScanner.nextLong();
        long ans = 0;
        long temp = 0;
        while(n%2 == 0) {
            temp++;
            n /= 2;
        }
        ans += getSteps(temp);
        for(long i=3;i*i <= n;i+=2) {
            temp = 0;
            while(n%i == 0) {
                n /= i;
                temp ++;
            }
            ans += getSteps(temp);
        }
        if (n > 1) {
            ans += getSteps(1);
        }
        System.out.println(ans);
    }

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

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

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

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }
}


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

public class Main {
	static List<Long> pfs;
	static List<Integer> pfcnts;
	private static void solve(){
		//Implement solution here.
		pfs = new ArrayList<Long>();
		pfcnts = new ArrayList<Integer>();
		long N = nl();
		primeFactorization(N);
		//System.out.println(Math.sqrt(N));
//		for(long i:pfs)System.out.print(i + ";");
//		System.out.println();
//		for(long i:pfcnts)System.out.print(i + ";");
//		System.out.println();
		int result = 0;
		for(int i = 0; i < pfcnts.size(); i++) {
			int a = pfcnts.get(i);
			int cmd = 1;
			while(a >= cmd) {
				a -= cmd;
				cmd++;
				result++;
			}
		}
		System.out.println(result);
	}

	/**
	 * Get prime factors list
	 * @param a: Target number to find prime factors
	 * @return List of prime factors
	 */
	static void primeFactorization(long a){
		//pfs.add(1L);
		for(int i = 2; i <= Math.sqrt(a) + 1; i++) {

			if(a % i == 0) {
				int cnt = 0;
				pfs.add((long)i);
				while(a % i == 0) {
					a /= i;
					cnt++;
				}
				pfcnts.add(cnt);
			}
		}
		if(a > 1) {
			pfs.add(a);
			pfcnts.add(1);
		}
	}
	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		boolean hasNext = true;
		while(hasNext){
			solve();
			try{
				br.mark(1);
				if(br.read() > 0){
					br.reset();
					System.out.println("---");
				} else {
					hasNext = false;
				}
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}


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

public class Main {

	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;

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

		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception addd) {
					addd.printStackTrace();
				}
			}
			return root.nextToken();
		}

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

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

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

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

	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));

	public static FastReader sc = new FastReader();

	static long mod = (int) (1e9+7),MAX=(long)(1e18);
	static List<Integer>[] edges;
	public static int[][] parent;
	public static int col = 20;
	public static void main(String[] args) throws IOException{
		long n = sc.nextLong();
		Map<Long,Integer> map = new HashMap<>();
		fac(n,map);
		//out.print(map);
		long ans = 0;
		for(long key : map.keySet()) {
			long num = 1;
			long val = map.get(key);
			int cnt = 0;
			while(val >= 0) {
			     val-=num;
			     ++num;
			   //  out.println(val);
			     if(val >= 0)
				++cnt;
			}
			//out.println(cnt);
			ans+=cnt;
		}
		out.print(ans);
		out.close();
	}

    public static void fac(long n, Map<Long, Integer> map)
    {
        // Print the number of 2s that divide n
        while (n%2==0)
        {   map.put(2L, map.getOrDefault(2L,0)+1);
       // out.print(map);
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {
            	map.put(i, map.getOrDefault(i,0)+1);
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
        	map.put(n, map.getOrDefault(n,0)+1);
    }
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.PI;
import static java.lang.System.in;
import static java.lang.System.out;

public class Main
{
    static int primes[];
    static int maxN = 2_000_000;

    static void sieve(){
        for(int i = 2; i*i < maxN; i++){
            for(int j = i*i; j < maxN; j+=i){
                if(primes[j]==0){
                    primes[j] = i;
                }
            }
        }
        for(int i = 0; i < maxN; i++){
            if(primes[i]==0){
                primes[i] = i;
            }
        }
    }
    public static void main(String[] args) throws Exception
    {
        Foster sc = new Foster();
        PrintWriter p = new PrintWriter(out);
        primes = new int[maxN];
        sieve();

        long n = sc.nextLong();
        ArrayList<Integer> tree = new ArrayList<>();
        for(int i = 1; (long)i*i <= n; i++)
        {
            if(n%i==0)  tree.add(i);
        }
        int count = 0;
        if(tree.size()==1 && n!=1)  count=1;    //bcoz it is prime
        int idx = 1;
        for(int i = 1; i < tree.size(); i++)
        {
            int now = tree.get(idx);
            //valid now ?
            int different = 0;
            ArrayList<Integer> ans = new ArrayList<>();
            while(now > 1)
            {
                different++;
                int smallestFactor = primes[now];
                ans.add(smallestFactor);
                while(now%smallestFactor==0)
                {
                    now /= smallestFactor;
                }
            }
            if(different==1 && n%tree.get(idx)==0)
            {
                n /= tree.get(idx);
                count++;
            }
            idx++;
        }
        p.println(count);
        p.close();
    }
/*
*/
/*
1. Check overflow in pow function or in general
2. Check indices of read array function
3. Think of an easier solution because the problems you solve are always easy
4. Check iterator of loop
5. If still doesn't work, then jump from the 729th floor 'coz "beta tumse na ho paayega"

    Move to top!!
*/

    static int[] sort(int[] a)
    {
        ArrayList<Integer> arr = new ArrayList<>();
        for(int i : a)
        {
            arr.add(i);
        }
        Collections.sort(arr);
        for(int i = 0 ; i < arr.size(); i++)
        {
            a[i] = arr.get(i);
        }
        return a;
    }

    static class Foster
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        StringTokenizer st = new StringTokenizer("");
        String next()
        {
            while (!st.hasMoreTokens())
                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());
        }
        int[] intArray(int n)                   // Check indices
        {
            int arr[] = new int[n];
            for(int i = 0; i < n; i++)
            {
                arr[i] = nextInt();
            }
            return arr;
        }
        long[] longArray(int n)                 // Check indices
        {
            long arr[] = new long[n];
            for(int i = 0; i < n; i++)
            {
                arr[i] = nextLong();
            }
            return arr;
        }
        int[] getBits(int n)                    //in Reverse Order
        {
            int a[] = new int[31];
            for(int i = 0; i < 31; i++)
            {
                if(((1<<i) & n) != 0)
                    a[i] = 1;
            }
            return a;
        }
        static long pow(long... a)
        {
            long mod = Long.MAX_VALUE;
            if(a.length == 3)   mod = a[2];
            long res = 1;
            while(a[1] > 0)
            {
                if((a[1] & 1) == 1)
                    res = (res * a[0]) % mod;
                a[1] /= 2;
                a[0] = (a[0] * a[0]) % mod;
            }
            return res;
        }
        void print(Object... o)
        {
            for(Object next : o)
            {
                System.err.print(next + " ");
            }
        }
        void println(Object... o)
        {
            for(Object next : o)
            {
                System.err.print(next + " ");
            }
            System.err.println();
        }
        void watch(Object...a) throws Exception
        {
            int i = 1;
            for (Object o: a)
            {
                boolean found = false;
                if (o.getClass().isArray())
                {
                    String type = o.getClass().getName().toString();
                    switch (type)
                    {
                        case "[I":
                        {
                            int[] test = (int[]) o;
                            println(i + " : " + Arrays.toString(test));
                            break;
                        }
                        case "[[I":
                        {
                            int[][] obj = (int[][]) o;
                            println(i + " : " + Arrays.deepToString(obj));
                            break;
                        }
                        case "[J":
                        {
                            long[] obj = (long[]) o;
                            println(i + " : " + Arrays.toString(obj));
                            break;
                        }
                        case "[[J":
                        {
                            long[][] obj = (long[][]) o;
                            println(i + " : " + Arrays.deepToString(obj));
                            break;
                        }
                        case "[D":
                        {
                            double[] obj = (double[]) o;
                            println(i + " : " + Arrays.toString(obj));
                            break;
                        }
                        case "[[D":
                        {
                            double[][] obj = (double[][]) o;
                            println(i + " : " + Arrays.deepToString(obj));
                            break;
                        }
                        case "[Ljava.lang.String":
                        {
                            String[] obj = (String[]) o;
                            println(i + " : " + Arrays.toString(obj));
                            break;
                        }
                        case "[[Ljava.lang.String":
                        {
                            String[][] obj = (String[][]) o;
                            println(i + " : " + Arrays.deepToString(obj));
                            break;
                        }
                        case "[C":
                        {
                            char[] obj = (char[]) o;
                            println(i + " : " + Arrays.toString(obj));
                            break;
                        }
                        case "[[C":
                        {
                            char[][] obj = (char[][]) o;
                            println(i + " : " + Arrays.deepToString(obj));
                            break;
                        }
                        default:
                        {
                            println(i + " : type not identified");
                            break;
                        }
                    }
                    found = true;
                }
                if (o.getClass() == ArrayList.class)
                {
                    println(i + " : LIST = " + o);
                    found = true;
                }
                if (o.getClass() == TreeSet.class)
                {
                    println(i + " : SET = " + o);
                    found = true;
                }
                if (o.getClass() == TreeMap.class)
                {
                    println(i + " : MAP = " + o);
                    found = true;
                }
                if (o.getClass() == HashMap.class)
                {
                    println(i + " : MAP = " + o);
                    found = true;
                }
                if (o.getClass() == LinkedList.class)
                {
                    println(i + " : LIST = " + o);
                    found = true;
                }
                if (o.getClass() == PriorityQueue.class)
                {
                    println(i + " : PQ = " + o);
                    found = true;
                }
                if (!found)
                {
                    println(i + " = " + o);
                }
                i++;
            }
        }
    }
}


import java.util.*;
import java.io.*;
public class Main{
    static long f(long n){
        return (n*(n+1))/2;
    }

    public static void main(String [] args) throws IOException{
        FastScanner sc=new FastScanner();
        long n=sc.nextLong();
        int cnt=0;
        List<Integer> list=new ArrayList<>();

        while(n%2==0){
            n/=2;
            cnt++;
        }
        list.add(cnt);

        for(int i=3;(i*i)<=n;i+=2){
            if(n%i==0){
                cnt=0;
                while(n%i==0){
                    n/=i;
                    cnt++;
                }
                list.add(cnt);
            }
        }
        if(n>1)list.add(1);

        cnt=0;
        for(int i : list){
            int l=0,r=i;
            int ans=0;

            while(l<=r){
                int mid=(l+r)/2;
                if(f((long)mid)<=i){
                    ans=mid;
                    l=mid+1;
                }
                else{
                    r=mid-1;
                }
            }

            cnt+=ans;
        }

        System.out.println(cnt);

    }

}

class FastScanner{
    private int BUFFER_SIZE = 1 << 16;

   private  DataInputStream din;

   private  byte[] buffer;

   private int bufferPointer, bytesRead;

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

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

   public String readLine() throws IOException {
        byte[] buf = new byte[64];
       int cnt = 0, c;
       while ((c = read()) != -1) {
           if (c == '\n')
               break;
           buf[cnt++] = (byte) c;
       }
       return new String(buf, 0, cnt);
   }

   public String next() throws IOException{

       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }

        StringBuilder builder = new StringBuilder();
       builder.append((char)c);
       c = read();
       while(!Character.isWhitespace(c)){
           builder.append((char)c);
           c = read();
       }

       return builder.toString();
   }

   public int nextInt() throws IOException {
       int ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (neg)
           return -ret;
       return ret;
   }

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

   public long nextLong() throws IOException {
       long ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');
       if (neg)
           return -ret;
       return ret;
   }

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

   public char nextChar() throws IOException{
       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }
       return (char) c;
   }

   public double nextDouble() throws IOException {
       double ret = 0, div = 1;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();

       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (c == '.') {
           while ((c = read()) >= '0' && c <= '9') {
               ret += (c - '0') / (div *= 10);
           }
       }

       if (neg)
           return -ret;
       return ret;
   }

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

   private void fillBuffer() throws IOException {
       bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
       if (bytesRead == -1)
           buffer[0] = -1;
   }

   private byte read() throws IOException {
       if (bufferPointer == bytesRead)
           fillBuffer();
       return buffer[bufferPointer++];
   }

   public void close() throws IOException {
       if (din == null)
           return;
       din.close();
   }

}


import java.util.*;
import java.io.*;
public class Main{

    static long f(long n){
        return (n*(n+1))/2;
    }

    public static void main(String [] args) throws IOException{
        FastScanner sc=new FastScanner();
        long n=sc.nextLong();
        int cnt=0;
        List<Integer> list=new ArrayList<>();

        while(n%2==0){
            n/=2;
            cnt++;
        }
        list.add(cnt);

        for(int i=3;(i*i)<=n;i+=2){
            if(n%i==0){
                cnt=0;
                while(n%i==0){
                    n/=i;
                    cnt++;
                }
                list.add(cnt);
            }
        }
        if(n>1)list.add(1);

        cnt=0;
        for(int i : list){
            int l=1,r=i;
            int ans=0;
            while(l<=r){
                int mid=(l+r)/2;
                if(f((long)mid)<=i){
                    ans=mid;
                    l=mid+1;
                }
                else{
                    r=mid-1;
                }
            }
            cnt+=ans;
        }

        System.out.println(cnt);

    }

}

class FastScanner{
    private int BUFFER_SIZE = 1 << 16;

   private  DataInputStream din;

   private  byte[] buffer;

   private int bufferPointer, bytesRead;

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

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

   public String readLine() throws IOException {
        byte[] buf = new byte[64];
       int cnt = 0, c;
       while ((c = read()) != -1) {
           if (c == '\n')
               break;
           buf[cnt++] = (byte) c;
       }
       return new String(buf, 0, cnt);
   }

   public String next() throws IOException{

       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }

        StringBuilder builder = new StringBuilder();
       builder.append((char)c);
       c = read();
       while(!Character.isWhitespace(c)){
           builder.append((char)c);
           c = read();
       }

       return builder.toString();
   }

   public int nextInt() throws IOException {
       int ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (neg)
           return -ret;
       return ret;
   }

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

   public long nextLong() throws IOException {
       long ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');
       if (neg)
           return -ret;
       return ret;
   }

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

   public char nextChar() throws IOException{
       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }
       return (char) c;
   }

   public double nextDouble() throws IOException {
       double ret = 0, div = 1;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();

       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (c == '.') {
           while ((c = read()) >= '0' && c <= '9') {
               ret += (c - '0') / (div *= 10);
           }
       }

       if (neg)
           return -ret;
       return ret;
   }

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

   private void fillBuffer() throws IOException {
       bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
       if (bytesRead == -1)
           buffer[0] = -1;
   }

   private byte read() throws IOException {
       if (bufferPointer == bytesRead)
           fillBuffer();
       return buffer[bufferPointer++];
   }

   public void close() throws IOException {
       if (din == null)
           return;
       din.close();
   }

}


#include<stdio.h>
#include<math.h>
typedef long long LL;
const int e[40]={0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
                 5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8};
const int mp[16]={1,3,5,7,11,15,21,33,35,55,77,105,165,231,385,1155};
const int results[16]={1,0,0,0,0,3,3,3,5,5,7,3,3,3,5,3};
const LL UnUseMethod=4759123141;
const unsigned long ULONG=18446744073709551615U;
int sz=0;LL count[2]={0},Box[10]={0};
LL IN(void)
{
  LL x=0;short f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
inline LL GCD(LL a,LL b){return !b?a:GCD(b,a%b);}
inline LL Mult(LL x,LL y,LL mod){LL z=x*y-(LL)((long double)x/mod*y+1e-8)*mod;return z<0?z+mod:z;}
inline LL BinaryModularPower(LL base,LL pow,LL mod)
{
  LL x=1;
  while(pow){if(pow&1){x=Mult(x,base,mod);}base=Mult(base,base,mod);pow>>=1;}
  return x;
}
void Exp(LL x,LL y){count[1]=0;while(!(x%y)){count[1]++;x/=y;}count[0]=x;return;}
int MillerRabin(const LL a)
{
  if(a==2)return 1;
  if(a%2==0||a==1)return 0;
  LL u=a-1,t=0,p=1;
  static const int pr[12]={2,3,5,7,11,13,17,19,23,29,31,37};
  while(!(u&1)){u>>=1;t++;}
  for(int i=0;i<12;++i)
  {
    p=pr[i]%a;
    if(!p)return 1;
    LL x=BinaryModularPower(p,u,a);
    if(x==1)continue;
    for(int j=0;x!=a-1&&j<t;++j)
    {
      x=Mult(x,x,a);
      if(x==1)return 0;
    }
    if(x==a-1)continue;
    return 0;
  }
  return 1;
}
inline LL Pseudo(const LL x){return (LL)((long double)pow(x,0.5));}
inline int PerfectSquare(const LL x){if(x<0)return 0;else{LL y=Pseudo(x);return x==y*y;}}
inline int PerfectCube(const LL x){LL z=(LL)cbrt(x);return x==z*z*z;}
LL iter(const LL x,const int k,const int lim,const int divisor)
{
  int i,j;LL bits,temp=GCD(k,x),sq=Pseudo(k*x),cutoff,p0,q0=1,p1,q1,Q,rootQ=0;
  cutoff=Pseudo(2*sq)/divisor,p1=sq;q1=(k*x-p1*p1);
  if(temp!=1)return temp;
  if((k*x)>>62)return 1;
  if(!q1){temp=GCD(x,p1);return temp==x?1:temp;}
  for(i=0;i<lim;i++)
  {
    temp=sq+p1-q1,Q=1;
    if(temp>=q1)Q+=temp/q1;
    p0=Q*q1-p1;q0=q0+Q*(p1-p0);
    if(q1<2*k*cutoff){temp=q1/GCD(q1,2*k);if(temp<cutoff)Box[sz++]=temp;}
    bits=0,temp=q0;
    while(!(temp&1)){bits++,temp>>=1;}
    if(!(bits&1)&&((temp&7)==1))
    {
      rootQ=Pseudo(q0);
      if(PerfectSquare(q0))
      {
        for(j=0;j<sz;++j){if(Box[j]==rootQ)break;}
        if(j==sz)break;
      }
    }
    temp=sq+p0-q0,Q=1;
    if(temp>=q0){Q+=temp/q0;}
    p1=Q*q0-p0,q1=q1+Q*(p0-p1);
    if(q0<2*k*cutoff){temp=q0/GCD(q0,2*k);if(temp<cutoff)Box[sz++]=temp;}
  }
  if(rootQ==1)return 1;
  if(i==lim)return 1;
  q0=rootQ,p1=p0+rootQ*((sq-p0)/rootQ);
  q1=(k*x-p1*p1)/q0;
  for(j=0;j<lim;j++)
  {
    Q=1,temp=sq+p1-q1;
    if(temp>=q1)Q+=temp/q1;
    p0=Q*q1-p1,q0=q0+Q*(p1-p0);
    if(p0==p1){q0=q1;break;}
    temp=sq+p0-q0,Q=1;
    if(temp>=q0)Q+=temp/q0;
    p1=Q*q0-p0,q1=q1+Q*(p0-p1);
    if(p0==p1)break;
  }
  temp=GCD(q0,x);
  if(temp==x)temp=1;
  return temp;
}
inline LL SQUFOF(LL x)
{
  LL y;
  if(MillerRabin(x))return x;
  if(PerfectSquare(x))return Pseudo(x);
  if(PerfectCube(x))return (LL)cbrt(x);
  for(int i=1;i<20000;i*=4)
  {
    for(int k=0;k<16;k++)
    {
      if(x==mp[k])return results[k];
      if(ULONG/mp[k]<=(unsigned long)x)continue;
      y=iter(x,mp[k],300*i,1);
      if(y==1||y==x)continue;
      return y;
    }
  }
  return 1;
}
signed main(void)
{
  LL a=0,p=1,q=-1,N=IN();
  if(N<=1)return puts("0"),0;
  Exp(N,2);a=e[count[1]];N=count[0];
  Exp(N,3);a+=e[count[1]];N=count[0];
  while(q*q<=UnUseMethod)
  {
    p+=6,q+=6;
    Exp(N,p);a+=e[count[1]];N=count[0];
    Exp(N,q);a+=e[count[1]];N=count[0];
  }
  if(N<=UnUseMethod){if(N>1){a++;}return printf("%lld\n",a),0;}
  if(MillerRabin(N)){a++;return printf("%lld\n",a),0;}
  while(N>=UnUseMethod)
  {
    p=SQUFOF(N);
    while(p<q)p=SQUFOF(p);
    while(!MillerRabin(p))p=SQUFOF(p);
    Exp(N,p);a+=e[count[1]];N=count[0];
  }
  if(MillerRabin(N)){a++;}return printf("%lld\n",a),0;
}


#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>
typedef long long LL;
const int e[40]={0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
                 5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8};
const int mp[16]={1,3,5,7,11,15,21,33,35,55,77,105,165,231,385,1155};
const int results[16]={1,0,0,0,0,3,3,3,5,5,7,3,3,3,5,3};
const LL UnUseMethod=4759123141;
const unsigned long ULONG=18446744073709551615U;
int sz=0;LL count[2]={0},Box[10]={0};
LL IN(void)
{
  LL x=0;short f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
inline LL GCD(LL a,const LL b){return !b?a:GCD(b,a%b);}
inline LL Mult(const LL x,const LL y,const LL mod)
{LL z=x*y-(LL)((long double)x/mod*y+1e-8)*mod;return z<0?z+mod:z;}
inline LL BinaryModularPower(LL base,LL pow,const LL mod)
{
  LL x=1;
  while(pow){if(pow&1){x=Mult(x,base,mod);}base=Mult(base,base,mod);pow>>=1;}
  return x;
}
void Exp(LL x,const LL y)
{count[1]=0;if(!y){return;}while(!(x%y)){count[1]++;x/=y;}count[0]=x;return;}
inline LL Pseudo(const LL x){return (LL)((long double)pow(x,0.5));}
inline int PerfectSquare(const LL x){if(x<0)return 0;else{LL y=Pseudo(x);return x==y*y;}}
inline int PerfectCube(const LL x){LL z=(LL)cbrt(x);return x==z*z*z;}
int MillerRabin(const LL a)
{
  /*http://www.olivierlanglois.net/archive/prime_cpp.htm*/
  if(a==2)return 1;
  if((a&1)==0||a<2)return 0;
  if(PerfectSquare(a))return 0;
  if(PerfectCube(a))return 0;
  static const int pr[7]={2,325,9375,28178,450775,9780504,1795265022};
  LL odd=a-1,k=0,p=1,x;
  while(!(odd&1)){odd>>=1;k++;}
  for(int i=0;i<7;++i)
  {
    p=(LL)(pr[i]%a);
    if(!p)return 1;
    x=BinaryModularPower(p,odd,a);
    if(x==1||x==a-1)return 1;
    for(int j=0;j<k;j++)
    {
      x=BinaryModularPower(x,2,a);
      if(x==a-1)return 1;
    }
  }
  return 0;
}
LL iter(const LL x,const int k,const int lim,const int divisor)
{
  static int i,j;
  LL bits,cutoff,p0=0,q0=1,p1,q1,Q,rootQ=0,sq=Pseudo(k*x),temp=GCD(k,x);
  cutoff=Pseudo(2*sq)/divisor,p1=sq;q1=(k*x-p1*p1);
  if(temp!=1)return temp;
  if((k*x)>>62)return 1;
  if(!q1){temp=GCD(x,p1);return temp==x?1:temp;}
  for(i=0;i<lim;i++)
  {
    temp=sq+p1-q1,Q=1;
    if(temp>=q1)Q+=temp/q1;
    p0=Q*q1-p1;q0=q0+Q*(p1-p0);
    if(q1<2*k*cutoff){temp=q1/GCD(q1,2*k);if(temp<cutoff)Box[sz++]=temp;}
    bits=0,temp=q0;
    while(!(temp&1)){bits++,temp>>=1;}
    if(!(bits&1)&&((temp&7)==1))
    {
      rootQ=Pseudo(q0);
      if(PerfectSquare(q0))
      {
        for(j=0;j<sz;++j){if(Box[j]==rootQ)break;}
        if(j==sz)break;
      }
    }
    temp=sq+p0-q0,Q=1;
    if(temp>=q0){Q+=temp/q0;}
    p1=Q*q0-p0,q1=q1+Q*(p0-p1);
    if(q0<2*k*cutoff){temp=q0/GCD(q0,2*k);if(temp<cutoff)Box[sz++]=temp;}
  }
  if(rootQ==1)return 1;
  if(i==lim)return 1;
  q0=rootQ,p1=p0+rootQ*((sq-p0)/rootQ);
  q1=(k*x-p1*p1)/q0;
  for(j=0;j<lim;j++)
  {
    Q=1,temp=sq+p1-q1;
    if(temp>=q1)Q+=temp/q1;
    p0=Q*q1-p1,q0=q0+Q*(p1-p0);
    if(p0==p1){q0=q1;break;}
    temp=sq+p0-q0,Q=1;
    if(temp>=q0)Q+=temp/q0;
    p1=Q*q0-p0,q1=q1+Q*(p0-p1);
    if(p0==p1)break;
  }
  temp=GCD(q0,x);
  if(temp==x)temp=1;
  return temp;
}
inline LL SQUFOF(const LL x)
{
  LL y;
  if(MillerRabin(x))return x;
  if(PerfectSquare(x))return Pseudo(x);
  if(PerfectCube(x))return (LL)cbrt(x);
  for(int i=1;i<20000;i*=4)
  {
    for(int k=0;k<16;k++)
    {
      if(x==mp[k])return results[k];
      if(ULONG/mp[k]<=(unsigned long)x)continue;
      y=iter(x,mp[k],300*i,1);
      if(y==1||y==x)continue;
      return y;
    }
  }
  return 1;
}
inline LL PollardRho(const LL n,const LL a)
{
  LL x=rand()%n,y=x;static LL gcd=1,k=0,i=1;
  while(gcd==1)
  {
    k++;
    x=Mult(x,x,n)+a;if(x>=n)x-=n;
    gcd=GCD(x>y?x-y:y-x,n);
    if(k==i){y=x;i<<=1;}
  }
  if(gcd==n)return PollardRho(n,a+1);
  return gcd;
}
signed main(void)
{
  LL a=0,p=1,q=-1,N=IN();
  if(N<=1)return puts("0"),0;
  Exp(N,2);a=e[count[1]];N=count[0];
  Exp(N,3);a+=e[count[1]];N=count[0];
  while(q*q<=UnUseMethod)
  {
    p+=6,q+=6;
    Exp(N,p);a+=e[count[1]];N=count[0];
    Exp(N,q);a+=e[count[1]];N=count[0];
  }
  if(N<=UnUseMethod){if(N>1){a++;}return printf("%lld\n",a),0;}
  if(MillerRabin(N)){a++;return printf("%lld\n",a),0;}
  srand((unsigned int)time(NULL));
  while(N>=UnUseMethod)
  {
    p=SQUFOF(N);
    while(p<q)p=SQUFOF(N);
    while(!MillerRabin(p))p=PollardRho(N,p);
    Exp(N,p);a+=e[count[1]];N=count[0];
  }
  if(MillerRabin(N)){a++;}return printf("%lld\n",a),0;
}