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

	public class Main {
		static final StdIn in = new StdIn();
		static final PrintWriter out = new PrintWriter(System.out);

		public static void main(String[] args) {
			// int t = in.nextInt();
			// int k = in.nextInt();

			String str = in.nextLine();
			char[] arr =str.toCharArray();

			StringBuilder s1 = new StringBuilder();
			s1.append(arr[0]);
			s1.append(arr[1]);

			StringBuilder s2 = new StringBuilder();
			s2.append(arr[2]);
			s2.append(arr[3]);

			int a1 = Integer.parseInt(s1.toString());
			int a2 = Integer.parseInt(s2.toString());

			//YYMM
			if(a1 == 0 || a2 == 0) {
				out.println("NA");
			} else {
				if(1 <= a1 && a1 <= 12) {
					if(1 <= a2 && a2 <= 12) {
						out.println("AMBIGUOUS");
					} else {
						if(a2 == 0) {
							out.println("NA");
						} else {
							out.println("MMYY");
						}

					}
				} else {
					if(1 <= a2 && a2 <= 12) {
						out.println("YYMM");
					} else {
						if(a2 == 0) {
							out.println("NA");
						} else {
							out.println("MMYY");
						}
					}
				}
			}

			// if(a1 == 0 || a2 == 0) {
			// 	out.println("NA");
			// } else if(a1 <= 12 && a2 <= 12) {
			// 	out.println("AMBIGUOUS");
			// } else if(a1 <=12 && a2 > 12) {
			// 	out.println("MMYY");
			// } else if(a1 > 12 && a2 <= 12) {
			// 	out.println("YYMM");
			// } else {
			// 	out.println("NA");
			// }

			//MMYY

			out.println();
			out.close();

		}

		public static boolean isEven(int num) {
			if(num%2 == 0) {
				return true;
			} else {
				return false;
			}
		}

		static class Rating {
			int before;
			int after;
		}

		static class Pair1 {
			long first;
			long second;
		}

		static void swap(int a, int b) {
			int temp = a;
			a = b;
			b = temp;
		}

		public static ArrayList<Integer> reverseArrayList(ArrayList<Integer> alist)
		{
			// Arraylist for storing reversed elements
			// this.revArrayList = alist;
			for (int i = 0; i < alist.size() / 2; i++) {
				Integer temp = alist.get(i);
				alist.set(i, alist.get(alist.size() - i - 1));
				alist.set(alist.size() - i - 1, temp);
			}

			// Return the reversed arraylist
			return alist;
		}

		static class Pair {
			int first = 1;
			int second = 2;
		}

		public void fibonacci(int N) {
			boolean arr[] = new boolean[N];
			Arrays.fill(arr, false);
			arr[0] = true;
			if(N>1)
				arr[1] = true;

			Pair p = new Pair();
			for (int i = 3; i <= N; i++) {

				if(p.first + p.second == i) {
					arr[i-1] = true;
					p.first = p.second;
					p.second = i;
				} else {
					arr[i-1] = false;
				}
			}
		}

		public class Solver {
			Solver() {

			}

		}

		static long factorial(long x) {
			if(x <= 1) {
				return 1;
			}
			long res = 2;
			for (int i = 3; i <= x; i++) {
				res = res * i;
			}
			return res;
		}

		static long gcdOfFactorial(long a, long b) {
			if (b == 0)
				return a;
			return gcdOfFactorial(b, a % b);
		}

		static class StdIn {
			final private int BUFFER_SIZE = 1 << 16;
			private DataInputStream din;
			private byte[] buffer;
			private int bufferPointer, bytesRead;
			public StdIn() {
				din = new DataInputStream(System.in);
				buffer = new byte[BUFFER_SIZE];
				bufferPointer = bytesRead = 0;
			}
			public StdIn(InputStream in) {
				try{
					din = new DataInputStream(in);
				} catch(Exception e) {
					throw new RuntimeException();
				}
				buffer = new byte[BUFFER_SIZE];
				bufferPointer = bytesRead = 0;
			}
			public String next() {
				int c;
				while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
				StringBuilder s = new StringBuilder();
				while (c != -1)
				{
					if (c == ' ' || c == '\n'||c=='\r')
						break;
					s.append((char)c);
					c=read();
				}
				return s.toString();
			}
			public String nextLine() {
				int c;
				while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
				StringBuilder s = new StringBuilder();
				while (c != -1)
				{
					if (c == '\n'||c=='\r')
						break;
					s.append((char)c);
					c = read();
				}
				return s.toString();
			}
			public int nextInt() {
				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[] readIntArray(int n, int os) {
				int[] ar = new int[n];
				for(int i=0; i<n; ++i)
					ar[i]=nextInt()+os;
				return ar;
			}
			public long nextLong() {
				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[] readLongArray(int n, long os) {
				long[] ar = new long[n];
				for(int i=0; i<n; ++i)
					ar[i]=nextLong()+os;
				return ar;
			}
			public double nextDouble() {
				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() {
				try{
					if (bufferPointer == bytesRead)
						fillBuffer();
					return buffer[bufferPointer++];
				} catch(IOException e) {
					throw new RuntimeException();
				}
			}
			public void close() throws IOException {
				if (din == null)
					return;
				din.close();
			}
		}
	}


#include<stdio.h>

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

    int a = n / 100;
    int b = n % 100;

    if(a >= 1 && a <= 12) {
        if(b >= 1 && b <= 12) {
            puts("AMBIGUOUS");
        } else {
            puts("MMYY");
        }
    } else {
        if(b >= 1 && b <= 12) {
            puts("YYMM");
        } else {
            puts("NA");
        }
    }
}


#include<stdio.h>
int main()
{
    int a,ab,cd;
    scanf("%d",&a);
    ab=a/100;
    cd=a%100;
   if(ab>=1 && ab<=12)
   {
       if(cd>=1 && cd<=12)
       {
           printf("AMBIGUOUS\n");
       }
       else printf("MMYY\n");
   }
   else
   {
    if(cd>=1 && cd<=12)
           printf("YYMM\n");
   else printf("NA\n");
   }
    return 0;
}


#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <complex>
typedef long long int LL;
using namespace std;

// 插入此處

int main() {
    char s[10];
    scanf("%s", s);
    int left = (s[0] - '0') * 10 + s[1] - '0';
    int right = (s[2] - '0') * 10 + s[3] - '0';
    if ((left > 12 || left == 0) && right <= 12 && right >= 1) {
        printf("YYMM\n");
    } else if ((right > 12 || right == 0) && left <= 12 && left >= 1) {
        printf("MMYY\n");
    } else if (right >= 1 && right <= 12 && left <= 12 && left >= 1) {
        printf("AMBIGUOUS\n");
    } else {
        printf("NA\n");
    }
}


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

int main()
{
	string s;
	int m, y;
	cin>>s;
	m = (s[0] - 48) * 10 +(s[1] - 48);
	y = (s[2] - 48) * 10 +(s[3] - 48);

	if((m == 0 || y == 0) &&(m>12 || y >12))
		cout<<"NA\n";
	else if(m>12 && y>12)
		cout<<"NA\n";
	else if(m<=12 && y<=12 && m!=0 && y!=0)
		cout<<"AMBIGUOUS\n";
	else if(y>12 || m>0)
		cout<<"MMYY\n";
	else
		cout<<"YYMM\n";
}


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

int main()
{
	string s;
	int m, y;
	cin>>s;
	m = (s[0] - 48) * 10 +(s[1] - 48);
	y = (s[2] - 48) * 10 +(s[3] - 48);

	if((m == 0 || y == 0) &&(m>12 || y >12))
		cout<<"NA\n";
	else if(m>12 && y>12)
		cout<<"NA\n";
	else if(m<=12 && y<=12 && m!=0 && y!=0)
		cout<<"AMBIGUOUS\n";
	else if(y>12)
		cout<<"MMYY\n";
	else
		cout<<"YYMM\n";
}


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

int main()
{
	string s;
	int m, y;
	cin>>s;
	m = (s[0] - 48) * 10 +(s[1] - 48);
	y = (s[2] - 48) * 10 +(s[3] - 48);

	if((m == 0 || y == 0) &&(m>12 || y >12))
		cout<<"NA\n";
	else if(m<=12 && y<=12 && m!=0 && y!=0)
		cout<<"AMBIGUOUS\n";
	else if(y>12)
		cout<<"MMYY\n";
	else
		cout<<"YYMM\n";
}


#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
int compare(const void *a,const void *b){
    if(*(long long*)a>*(long long*)b)return 1;
    return -1;
}
int main()
{   int um=0,dm=0;
    char s[5];
    scanf("%s",s);
    if((s[0]=='1'&&(s[1]=='0'||s[1]=='1'||s[1]=='2'))||(s[0]=='0'&&s[1]!='0'))um=1;
if((s[2]=='1'&&(s[3]=='0'||s[3]=='1'||s[3]=='2'))||(s[2]=='0'&&s[3]!='0'))dm=1;
if(um==1&&dm==1)printf("AMBIGUOUS");else if(um==1)printf("MMYY");
else if(dm==1)printf("YYMM");else printf("NA");

    return 0;
}


#include <stdio.h>
int main(void)
{
    int i=0, s;
    scanf("%d", &s);
    if(s/100==0 && 1<=s%100 && s%100<=12){
        printf("YYMM\n");
    }
    else if(s/100>=13 && 1<=s%100 && s%100<=12){
        printf("YYMM\n");
    }
    else if(1<=s/100 && s/100<=12 && (s%100>=13 || s%100==0)){
        printf("MMYY\n");
    }
    else if(1<=s/100 && s/100<=12 && 1<=s%100 && s%100<=12){
        printf("AMBIGUOUS\n");
    }
    else{
        printf("NA\n");
    }

    return 0;
}


#include <stdio.h>

int type(int s[2])
{
	if ( s[0] == 0 ) {
		if ( s[1] == 0 ) return 0;
		else return 1;
	}
	if ( s[0] == 1 ) {
		if ( s[1] < 3 ) return 1;
		else return 0;
	}
}

int main()
{
	int n = 2;
	int num1[n], num2[n];
	for ( int i = 0; i < n; i++ ) {
		scanf("%1d", &num1[i]);
	}
	for ( int i = 0; i < n; i++ ) {
		scanf("%1d", &num2[i]);
	}
	if ( type(num1) == 1 ) {
		if ( type(num2) == 1 ) printf("AMBIGUOUS");
		else printf("MMYY");
	} else {
		if ( type(num2) == 1 ) printf("YYMM");
		else printf("NA");
	}
	printf("\n");
	return 0;
}


#include <stdio.h>

int main(void) {
	int input_num = 0;
	int YYMM_flag1 = 0;
	int YYMM_flag2 = 0;
	int MMYY_flag1 = 0;
	int MMYY_flag2 = 0;

	if(scanf("%d", &input_num)==1);

	if (0 <= (input_num % 100) && (input_num % 100) <= 99) {
		MMYY_flag1 = 1;
		if (1 <= (input_num / 100) && (input_num / 100) <= 12) {
			MMYY_flag2 = 1;
		}
	}
	if (1 <= (input_num % 100) && (input_num % 100) <= 12) {
		YYMM_flag1 = 1;
		if (1 <= (input_num / 100) && (input_num / 100) <= 99) {
			YYMM_flag2 = 1;
		}
	}
	if (MMYY_flag1 == 1 && MMYY_flag2 == 1 && YYMM_flag1 == 1 && YYMM_flag2 == 1) {
		printf("AMBIGUOUS\n");
	}
	else if (MMYY_flag1 == 1 && MMYY_flag2 == 1 && (YYMM_flag1 == 0 || YYMM_flag2 == 0)) {
		printf("MMYY\n");
	}
	else if ((MMYY_flag1 == 0 || MMYY_flag2 == 0) && YYMM_flag1 == 1 && YYMM_flag2 == 1) {
		printf("YYMM\n");
	}
	else {
		printf("NA\n");
	}

}


#include <stdio.h>

int main(void) {
	int input_num = 0;
	int YYMM_flag1 = 0;
	int YYMM_flag2 = 0;
	int MMYY_flag1 = 0;
	int MMYY_flag2 = 0;

	scanf("%d", &input_num);

	if (0 <= (input_num % 100) && (input_num % 100) <= 99) {
		MMYY_flag1 = 1;
		if (1 <= (input_num / 100) && (input_num / 100) <= 12) {
			MMYY_flag2 = 1;
		}
	}
	if (1 <= (input_num % 100) && (input_num % 100) <= 12) {
		YYMM_flag1 = 1;
		if (1 <= (input_num / 100) && (input_num / 100) <= 99) {
			YYMM_flag2 = 1;
		}
	}
	if (MMYY_flag1 == 1 && MMYY_flag2 == 1 && YYMM_flag1 == 1 && YYMM_flag2 == 1) {
		printf("AMBIGUOUS\n");
	}
	else if (MMYY_flag1 == 1 && MMYY_flag2 == 1 && (YYMM_flag1 == 0 || YYMM_flag2 == 0)) {
		printf("MMYY\n");
	}
	else if ((MMYY_flag1 == 0 || MMYY_flag2 == 0) && YYMM_flag1 == 1 && YYMM_flag2 == 1) {
		printf("YYMM\n");
	}
	else {
		printf("NA\n");
	}

}


function main(input) {

        const bottom = input % 100;
        const top = (input - bottom) / 100;

        const isMonth = m => (1 <= m) && (m <= 12);
        const isBottomInMonth = isMonth(bottom);
        const isTopInMonth = isMonth(top);

        if ((!isBottomInMonth) && (!isTopInMonth)) {
                console.log('NA');
        }
        else if ((isBottomInMonth) && (isTopInMonth)) {
                console.log('AMBIGUOUS');
        }
        else if (isBottomInMonth) {
                console.log('YYMM');
        }
        else {
                console.log('MMYY');
        }
}

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


function main(input){
  const S=parseInt(input,10);
  if( (Math.floor(S/100)>=13 || Math.floor(S/100)==0) && ( ((S%100)>=13) ||(S%100)==0)){
    console.log("NA");
  }else if(Math.floor(S/100)>=13 || Math.floor(S/100)==0){
    console.log("YYMM");
  }else if((S%100)>=13 || (S%100)==0){
    console.log("MMYY");
  }else{
    console.log("AMBIGUOUS");
  }
}

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


// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
  	var f = parseInt(input.substring(0, 2));
  	var s = parseInt(input.substring(2));
  	var r;

  	if (f === 0) {
      if (s > 12) r = "NA";
      else if (s === 0) r = "NA";
      else r = "YYMM";
    }
  	else if (s === 0) {
      if (f > 12) r = "NA";
      else if (f === 0) r = "NA";
      else r = "MMYY";
    }
  	else {
      if (f > 12 && s > 12) r = "NA";
      else if (f <= 12 && s <= 12) r = "AMBIGUOUS";
      else if (f <= 12 && s > 12) r = "MMYY";
      else if (f > 12 && s <= 12) r = "YYMM";
    }

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


function main(input) {
  const S = input.toString().match(/.{2}/g).map(n => parseInt(n, 10));

  if (S[0] <= 12 && S[1] <= 12 && (S[0] > 0 || S[1] > 0)) {
    console.log('AMBIGUOUS');
  }
  else if (S[0] <= 12 && S[0] > 0) {
    console.log('MMYY');
  }
  else if (S[1] <= 12 && S[1] > 0) {
    console.log('YYMM');
  }
  else {
    console.log('NA');
  }
}

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


//↓見なくていいよ！ここから--------------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function makeClone(obj){return JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//↑見なくていいよ！ここまで--------------------------------------------------
function Main(){
	var s = nextCharArray();
	var mae = myconv(s[0] + s[1],1);
	var ato = myconv(s[2] + s[3]);
	if(mae >= 1 && mae < 13 && ato >= 1 && ato < 13){
		myout("AMBIGUOUS")
	}else if(mae >= 13 && ato >= 1 && ato < 13){
		myout("YYMM");
	}else if(mae >= 1 && mae < 13 && ato >= 13){
		myout("MMYY");
	}else{
		myout("NA");
	}
}


"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let s = next()
    let m = ["01","02","03","04","05","06","07","08","09", "10","11","12"]
    const first = s.slice(0,2)
    const second = s.slice(3)
    if(m.includes(first) && m.includes(second)){
        console.log("AMBIGUOUS")
        return
    } else if (m.includes(first) && !m.includes(second)){
        console.log("MMYY")
        return
    } else if (!m.includes(first) && m.includes(second)){
        console.log("YYMM")
        return
    } else {
        console.log("NA")
        return
    }
}
Main()


package main

import "fmt"

var x int
var ok1, ok2 bool

func main() {
  fmt.Scanf("%d", &x)

  if 1 <= x/100 && x/100 <= 12 {
    ok1 = true
  }
  if 1 <= x%100 && x%100 <= 12 {
    ok2 = true
  }

  if ok1 && ok2 {
    fmt.Println("AMBIGUOUS")
  } else if ok1 {
    fmt.Println("MMYY")
  } else if ok2 {
    fmt.Println("YYMM")
  } else {
    fmt.Println("NA")
  }
}


package main

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

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 2
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	s := getNextString(scanner)
	if isYYMM(s) && isMMYY(s) {
		fmt.Fprintln(writer, "AMBIGUOUS")
		return
	}
	if isYYMM(s) {
		fmt.Fprintln(writer, "YYMM")
		return
	}
	if isMMYY(s) {
		fmt.Fprintln(writer, "MMYY")
		return
	}
	fmt.Fprintln(writer, "NA")
}

func isYYMM(s string) bool {
	return isYY(s[0:2]) && isMM(s[2:4])
}
func isMMYY(s string) bool {
	return isMM(s[0:2]) && isYY(s[2:4])
}

func isYY(s string) bool {
	for i := 0; i < 100; i++ {
		if s == fmt.Sprintf("%02d", i) {
			return true
		}
	}

	return false
}
func isMM(s string) bool {
	for i := 0; i < 12; i++ {
		if s == fmt.Sprintf("%02d", i+1) {
			return true
		}
	}

	return false
}


package main

import (
	"fmt"
	"strconv"
)

func month(s string) bool {
	i, _ := strconv.Atoi(s)
	if i > 0 && i <= 12 {
		return true
	}
	return false
}

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

	first := s[:2]
	last := s[2:]

	if month(first) && month(last) {
		fmt.Println("AMBIGUOUS")
	} else if month(first) {
		fmt.Println("MMYY")
	} else if !month(last) {
		fmt.Println("NA")
	} else {
		fmt.Println("YYMM")
	}
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}

func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	s := Scan()
	x, y := stringToInt(s[:2]), stringToInt(s[2:])
	if (x == 0 && y > 12) || (x > 12 && y == 0) {
		fmt.Println("NA")
	} else if x <= 12 && y <= 12 {
		fmt.Println("AMBIGUOUS")
	} else if x > 12 && y > 12 {
		fmt.Println("NA")
	} else if x <= 12 {
		fmt.Println("MMYY")
	} else {
		fmt.Println("YYMM")
	}
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}

func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	s := Scan()
	x, y := stringToInt(s[:2]), stringToInt(s[2:])
	if x == 0 || y == 0 {
		fmt.Println("NA")
	} else if x <= 12 && y <= 12 {
		fmt.Println("AMBIGUOUS")
	} else if x > 12 && y > 12 {
		fmt.Println("NA")
	} else if x <= 12 {
		fmt.Println("MMYY")
	} else {
		fmt.Println("YYMM")
	}
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}

func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	s := Scan()
	x, y := stringToInt(s[:2]), stringToInt(s[2:])
	if x == 0 || y == 0 {
		fmt.Println("NA")
	} else if x <= 12 && y <= 12 {
		fmt.Println("AMBIGOUS")
	} else if x > 12 && y > 12 {
		fmt.Println("NA")
	} else if x <= 12 {
		fmt.Println("MMYY")
	} else {
		fmt.Println("YYMM")
	}
}


s = gets.chomp
x = s[0..1].to_i
y = s[2..3].to_i

if (x > 12 && y > 12) || (x > 12 && y == 0) || (x == 0 && y > 12) || (x == 0 && y == 0)
  puts 'NA'
elsif 0 < x && x <= 12 && 0 < y && y <= 12
  puts 'AMBIGUOUS'
elsif 0 < y && y <= 12
  puts 'YYMM'
elsif x <= 12
  puts 'MMYY'
end


s = gets.chomp!

head = s[0, 2].to_i
tail = s[2, 2].to_i

case head
when 0
    head_mm = 0
when 1..12
    head_mm = 1
when 13..99
    head_mm = 2
end

case tail
when 0
    tail_mm = 0
when 1..12
    tail_mm = 1
when 13..99
    tail_mm = 2
end

case [head_mm, tail_mm]
when [0,0], [0,2], [2,0], [2,2]
    puts "NA"
when [0, 1], [2,1]
    puts "YYMM"
when [1,0], [1,2]
    puts "MMYY"
when [1,1]
    puts "AMBIGUOUS"
end


S=gets.chomp
s1=S[0..1].to_i
s2=S[2..3].to_i

a=false
b=false
if s1<=12 && s1>0 then
  a=true
end
if s2<=12 && s2>0 then
  b=true
end

if a && b then
  puts 'AMBIGUOUS'
elsif !a && b
  puts 'YYMM'
elsif a && !b
  puts 'MMYY'
else
  puts 'NA'
end


s = gets().chomp

s1 = s[0, 2].to_i
s2 = s[2, 2].to_i

s2_is_ok = false
s2 > 0 && s2 < 13
  s2_is_ok = true
end

s1_is_ok = false
s1 > 0 && s1 < 13
  s1_is_ok = true
end

if s1_is_ok && s2_is_ok
  puts 'AMBIGUOUS'
elsif s1_is_ok && !s2_is_ok
  puts 'MMYY'
elsif !s1_is_ok && s2_is_ok
  puts 'YYMM'
else
  puts 'NA'
end


s = gets.chomp
if s[0..1].to_i <= 12 && s[2..3].to_i <= 12 && s[0..1].to_i >= 1 && s[2..3].to_i >= 1
    puts "AMBIGUOUS"
elsif s[0..1].to_i <= 12 && s[2..3].to_i > 12 && s[0..1].to_i >= 1
    puts "MMYY"
elsif s[0..1].to_i <= 12 && s[2..3] == "00"
    puts "MMYY"
elsif s[0..1].to_i > 12 && s[2..3].to_i <= 12 && s[2..3].to_i >= 1
    puts "YYMM"
elsif  s[0..1] == "00" && s[2..3].to_i <= 12
    puts "YYMM"
elsif  s[0..1].to_i > 12 && s[2..3].to_i > 12
    puts "NA"
elsif s[0..1] == "00" || s[2..3] == "00"
    puts "NA"
end


s = gets.chomp
if s[0..1].to_i <= 12 && s[2..3].to_i <= 12 && s[0..1].to_i >= 1 && s[2..3].to_i >= 1
    puts "AMBIGUOUS"
elsif s[0..1].to_i <= 12 && s[2..3].to_i > 12 && s[0..1].to_i >= 1
    puts "MMYY"
elsif s[0..1].to_i <= 12 && s[2..3] == "00"
    puts "MMYY"
elsif s[0..1].to_i > 12 && s[2..3].to_i <= 12 && s[2..3].to_i >= 1
    puts "YYMM"
elsif  s[0..1] == "00" && s[2..3].to_i <= 12
    puts "YYMM"
elsif  s[0..1].to_i > 12 && s[2..3].to_i > 12
    puts "NA"
elsif s[0..1].to_i == 0 || s[2..3].to_i == 0
    puts "NA"
end


#[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::ascii::AsciiExt;
use std::iter::Iterator;

fn main() {
    input! {
        s:String,
    }

    let first = &s[0..2];
    let last = &s[2..4];

    let firstNum : i32 = first.parse().unwrap();
    let lastNum : i32 = last.parse().unwrap();

    if firstNum > 0 && firstNum < 13 && lastNum < 13 && lastNum > 0 {
        println!("AMBIGUOUS");
    } else if firstNum <= 12 && firstNum > 0{
        println!("MMYY");
    } else if  lastNum <=  12 && lastNum >0 {
        println!("YYMM")
    }else {
        println!("NA")
    }
}


fn main() {
    let v: Vec<char> = {
        let s = read::<String>();
        s.chars().into_iter().collect()
    };
    let x = ((v[0] as u8) - b'0') * 10 + (v[1] as u8) - b'0';
    let y = ((v[2] as u8) - b'0') * 10 + (v[3] as u8) - b'0';
    let yymm = 1 <= y && y <= 12;
    let mmyy = 1 <= x && x <= 12;
    let ret = if yymm && mmyy {
        "AMBIGUOUS"
    } else if yymm && !mmyy {
        "YYMM"
    } else if !yymm && mmyy {
        "MMYY"
    } else {
        "NA"
    };
    println!("{}", ret);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}


use std::io::stdin;

fn main() {
    let mut s = String::new();
    stdin().read_line(&mut s).unwrap();
    let a = s[0..2].parse::<usize>().unwrap();
    let b = s[2..4].parse::<usize>().unwrap();
    let a_b = (a <= 12) && (a>0);
    let b_b = (b <= 12) && (b>0);
    println!("{}", match (a_b, b_b) {
        (true, true) => "AMBIGUOUS",
        (false, true) => "YYMM",
        (true, false) => "MMYY",
        (false, false) => "NA",
    });
}


#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

int main() {
    int s;
    cin >> s;

    int a = s / 100;
    int b = s % 100;

    if (1 <= a && a <= 12) {
        if (1 <= b && b <= 12) {
            cout << "AMBIGUOUS" << endl;
        } else {
            cout << "MMYY" << endl;
        }
    } else {
        if (1 <= b && b <= 12) {
            cout << "YYMM" << endl;
        } else {
            cout << "NA" << endl;
        }
    }

    return 0;
}


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

#[fastout]
fn main() {
    input! {
        s: Chars
    };

    let mut is_mmyy = false;
    let mut is_yymm = false;
    let mut is_na = false;

    let s1 = s[0] as i32 - 48;
    let s2 = s[1] as i32 - 48;
    let s3 = s[2] as i32 - 48;
    let s4 = s[3] as i32 - 48;

    let x1 = s1 * 10 + s2;
    let x2 = s3 * 10 + s4;

    if x1 == 0 || x2 == 0 {
        is_na = true;
    }
    if x1 > 12 {
        is_yymm = true;
    }
    if x2 > 12 {
        is_mmyy = true;
    }
    if 0 < x1 && x1 < 13 && 0 < x2 && x2 < 13 {
        is_yymm = true;
        is_mmyy = true;
    }

    if is_na {
        println!("NA");
    } else if is_yymm && is_mmyy {
        println!("AMBIGUOUS");
    } else if is_mmyy {
        println!("MMYY");
    } else {
        println!("YYMM");
    }
}


#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use itertools::Itertools;
use proconio::*;
use text_io::*;

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

fn main() {
    let s: String = read!();
    let s = s.chars().collect_vec();

    let a = &s[..2].iter().collect::<String>();
    let b = &s[2..].iter().collect::<String>();

    let a: usize = a.parse().unwrap();
    let b: usize = b.parse().unwrap();

    if a < 13 && b < 13 {
        println!("{}", "AMBIGUOUS");
    } else if a < 13 {
        println!("{}", "MMYY");
    } else if b < 13 {
        println!("{}", "YYMM");
    } else {
        println!("{}", "NA");
    }
}


let arr=readLine()!

 let characters = arr.characters

var c = 0
var o1 = ""
var o2 = ""
var p : String = ""
for var s in characters {

        if( c < 2 ) {
        p = String(s)
        o1 += p
    } else {
                p = String(s)
        o2 += p
        }
        c += 1
}

var x : Int = Int( o1 )!
var y : Int = Int( o2 )!

if( ( ( x > 0 ) && ( x <= 12 ) ) && ( ( y < 1 ) || ( y > 12 ) ) ) {
  print( "MMYY" )
} else if( ( ( x > 12 || x < 1 ) ) && ( ( y <= 12  ) && ( y > 0 ) ) ) {
  print( "YYMM" )
} else if( ( ( x > 0 ) && ( x <= 12 ) ) && ( ( y <= 12 ) && ( y > 0 ) ) ) {
  print( "AMBIGUOUS" )
} else {
  print( "NA" )
}


let s = Int(readLine()!)!
let s1 = s / 100
let s2 = s % 100
var c = 0
let l = ["NA","YYMM","MMYY","AMBIGUOUS"]
if 1<=s2 && s2<=12 {c += 1}
if 1<=s1 && s1<=12 {c += 2}
print(l[c])


import Foundation

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

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

//func gcd(x: Int, _ y: Int) -> Int {
//    if y == 0 {
//        return x
//    } else {
//        return gcd(y, x%y)
//    }
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}

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

let S = readInt()!
let Y = S / 100
let M = S % 100
var ans = "YYMM"
if M > 12 || M == 0 {
    if Y > 12 || Y == 0 {
        ans = "NA"
    } else {
        ans = "MMYY"
    }
} else if Y > 0 && Y <= 12{
    ans = "AMBIGUOUS"
}
print(ans)


s = int(input())
s1 = s // 100
s2 = s % 100
c = 0
l = ["NA","YYMM","MMYY","AMBIGUOUS"]
if 1<=s2<=12:
  c += 1
if 1<=s1<=12:
  c += 2
print(l[c])


import Foundation
let S = readLine()!

let first = Int(S.substring(with: NSRange(location: 0, length: 2)))
let second = Int(S.substring(with: NSRange(location: 2, length: 2)))

if let f = first, let s = second, 1...12 ~= f || 1...12 ~= s  {
  if f > 12 {
    print("YYMM")
  } else if s > 12 {
    print("MMYY")
  } else {
    print("AMBIGUOUS")
  }
} else {
  print("NA")
}


let arr=readLine()!

 let characters = arr.characters

var c = 0
var o1 = ""
var o2 = ""
var p : String = ""
for var s in characters {

        if( c < 2 ) {
        p = String(s)
        o1 += p
    } else {
                p = String(s)
        o2 += p
        }
        c += 1
}

var x : Int = Int( o1 )!
var y : Int = Int( o2 )!

if( ( ( x > 0 ) || ( x <= 12 ) ) && ( ( y < 1 ) || ( y > 12 ) ) ) {
  print( "MMYY" )
} else if( ( ( x > 12 || x < 1 ) ) && ( ( y <= 12  ) || ( y < 1 ) ) ) {
  print( "YYMM" )
} else if( ( ( x > 1 ) || ( x <= 12 ) ) && ( ( y >= 12 ) || ( y < 1 ) ) ) {
  print( "AMBIGUOUS" )
} else {
  print( "NA" )
}


const main = (line) => {
	const Ns = [line.substring(0,2),line.substring(2,4)].map(Number)
  if(Ns[0] <= 12 && Ns[0] > 0 && Ns[1] <= 12 && Ns[1] > 0 )  return console.log("AMBIGUOUS")
  if((Ns[0] === 0 || Ns[0] > 12) && Ns[1] <= 12 && Ns[1] > 0)  return console.log("YYMM")
  if(Ns[0] <= 12 && Ns[0] > 0 && (Ns[1] === 0 || Ns[1] > 12))  return console.log("MMYY")
  console.log("NA")
  }

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


//*
// yarn compile template.ts で監視可能
{
  const pattern = {
    yymm: "YYMM",
    mmyy: "MMYY",
    ambiguous: "AMBIGUOUS",
    na: "NA",
  }
  const process = (a: string): string => {
    const firstHalf = parseInt(a.substring(0, 2))
    const latterHalf = parseInt(a.substring(2))

    let isFirstYy = false
    let islatterYy = false

    if (firstHalf === 0 || firstHalf > 12) {
      // firstHalf === yy
      isFirstYy = true
    }
    if (latterHalf === 0 || latterHalf > 12) {
      // latterHalf === yy
      islatterYy = true
    }

    if (isFirstYy && islatterYy) {
      return pattern.na
    }
    if (isFirstYy) {
      return pattern.yymm
    }
    if (islatterYy) {
      return pattern.mmyy
    }
    return pattern.ambiguous
  }

  const Main = (input: string): string => {
    //const n: number = parseInt(input)
    //const a: string[]  = input.split(" ")
    //const aa: string[][]  = input.split("\n").split(" ")
    const res = process(input)
    console.log(res)
    return res
  }
  Main(require("fs").readFileSync("/dev/stdin", "utf8"))
}

// */


const main = (input: string) => {
  const YY = parseInt(input.slice(0, 2));
  const MM = parseInt(input.slice(2, 4));
  let answer: string = "NA";

  if (isInMonth(YY) && isInMonth(MM)) {
    answer = "AMBIGUOUS";
  } else if (isInMonth(MM)) {
    answer = "YYMM";
  } else if (isInMonth(YY)) {
    answer = "MMYY";
  }

  console.log(answer);
};

const isInMonth = (num: number) => {
  const min = 1;
  const max = 12;
  return num >= min && num <= max;
};

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


((input: string): void => {
    const hoge = input.trim().split("");
    const fuga = (p, q) => Number(hoge.slice(p, q).join(""));
    const [a, b] = [fuga(0,2), fuga(2,4)];
    console.log((() => {
        if ((0 < a && a <= 12) && (12 > b && b <= 31)) {return "MMYY"}
        else if((12 < a && a <= 31) && (0 < b && b <= 12)) {return "YYMM"}
        else if((0 < a && a <= 12) && (b <= 12)) {return "AMBIGUOUS"}
        else {return "NA"}
    })());
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = (input: string) => {
  const YY = parseInt(input.slice(0, 2));
  const MM = parseInt(input.slice(2, 4));
  let answer: string = "NA";

  if (MM > 0 && MM <= 12 && YY > 0 && MM <= 12) {
    answer = "AMBIGUOUS";
  } else if (MM > 0 && MM <= 12) {
    answer = "YYMM";
  } else if (YY > 0 && YY <= 12) {
    answer = "MMYY";
  }

  console.log(answer);
};

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


const input = "0112";

const main = (input: string) => {
  const YY = parseInt(input.slice(0, 2));
  const MM = parseInt(input.slice(2, 4));
  const [YYMM, MMYY, AMBIGUOUS, NA] = ["YYMM", "MMYY", "AMBIGUOUS", "NA"];
  let answer: string = NA;

  if (MM > 0 && MM >= 12 && YY > 0 && MM >= 12) {
    answer = AMBIGUOUS;
  } else if (MM > 0 && MM <= 12) {
    answer = YYMM;
  } else if (YY > 0 && YY <= 12) {
    answer = MMYY;
  }

  console.log(answer);
};

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


N = int(input())
input_array = list(map(int,input().split()))
day = input_array[0]
left = input_array[1]
out = 0
out += left

for i in range(N):
    temp = int(input())
    out += (1+int((day-1)/temp))

print(out)


N = int(input())
D, X = map(int, input().split())
A = [int(input()) for _ in range(N)]
for i in range(len(A)):
    day = 1
    while day <= D:
        day += A[i]
        X += 1
print(X)


import sys

n=int(input())
d,x=map(int,input().split())
a=[]
choco=0
for i in range(n):
    a=int(input())
    choco+=1+d//a
    if(d%a==0):choco-=1
print(choco+x)


n = int(input())
d,x = [int(t) for t in input().split()]
a = []
for i in range(n):
  a.append(int(input()))
res = 0
for i in range(n):
  c = a[i]
  res += 1
  while c < d:
    res += 1
    c += a[i]
  print(i,res)
res += x
print(res)


N = int(input())
D,X = input().split()
x = 0
for n in range(N):
  An = int(input())
  x += 1+(N-1)//An
print(str(x)+X)


n=int(input())
d,x=map(int,input().split())
cnt = n
for i in range(n):
    a = int(input())
    p = 1
    while p <= d:
        p +=a
        cnt +=1
print(cnt+x)


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

public class Main {

	public static void main(String[] args) throws IOException {
		InputReader in = new InputReader(System.in);
		int n = in.readInt();
		int d = in.readInt();
		int x = in.readInt();
		int sum = 0;
		for(int i= 0; i<n; i++) {
			int a = in.readInt();
			int k =0;
			while(d >= k*a + 1) {
				sum++;
				k++;
			}
		}
		System.out.println(x+sum);
	}
}
class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public String next() {
		return readString();
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author noob_coder
 */
public class Main {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
                out.close();
        }

        static class TaskB {
                public void solve(int testNumber, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int d = in.i();
                        int x = in.i();
                        int ans = 0;
                        for (int i = 0; i < n; i++) {
                                int q0 = in.i();
                                int a = 1;
                                int j = 1;
                                while (a <= d) {
                                        ans++;
                                        a = j * q0 + 1;
                                        j++;
                                }
                        }
                        ans += x;
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        }
}


/*
......................................................................................................................................
.....................................  ________ ____ __________________________________________ .....................................
..................................... /  _____/|    |   \      \__    ___/\_   _____/\______   \.....................................
...................................../   \  ___|    |   /   |   \|    |    |    __)_  |       _/.....................................
.....................................\    \_\  \    |  /    |    \    |    |        \ |    |   \.....................................
..................................... \______  /______/\____|__  /____|   /_______  / |____|_  /.....................................
.....................................        \/                \/                 \/         \/ .....................................
......................................................................................................................................
.............................................................,;'';:...................................................................
........................................................+@@@@@@@@@@@@@@'..............................................................
.....................................................#@@@##############@@@:...........................................................
...................................................@@@####################@@,.........................................................
.................................................@@#########################@@........................................................
...............................................:@############################@@.......................................................
..............................................@@######@@@#';;'#@@@############@@:.....................................................
.............................................@#####@@,````````````,@@###########@:....................................................
............................................@####@;``````````````````+@##########@....................................................
...........................................@###@:``````````````````````#@########@@...................................................
..........................................@####``````````````````````````@########@@..................................................
.........................................###@.````````````````````````````@########@+.................................................
.........................................@#@```````````````````````````````#########@.................................................
........................................@#@`````````````````````````````````########@@................................................
.......................................,@@```````````````````````````````````@#######@:...............................................
.......................................@@`````````````````````````````````````@#######@...............................................
.......................................@:````````````````````#@@'``````````````@######@+..............................................
......................................#@```````````````````@@@@@@@#````````````########@..............................................
......................................@```````````````````@@@@@@@@@@````````````@######@+.............................................
......................................@``````````````````@@@@@@@+   +```````````+#######@.............................................
.....................................;:``````````````````@@@@@@@    @````````````@######@'............................................
.....................................@``````````````````:@@@@@@@    @````````````@#######@............................................
.....................................@```,@@@#``````````;@@@@@@@    @````````````:#######@:...........................................
.....................................@``@@@@@@@@````````.@@@@@@@#  ,#`````````````@#######@...........................................
.....................................@`@@@@@@@+'@````````@@@@@@@@@@@``````````````@#######@...........................................
.....................................@,@@@@@@   ,```:+:``:@@@@@@@@@.``````````````@########@..........................................
.....................................#@@@@@@@  ;@@#;,,,@``:@@@@@@@````````````````#########@..........................................
.....................................+@@@@@@@@',,,,,,,,;,```.'+;``````````````````'########@;.........................................
.....................................'@@@@',,,,,,,,,,,,,@`````````````````````````:#########@.........................................
....................................:@#,,,,,:;;;;;:,,,,,@`````````````````````````.#########@.........................................
.................................:@#@@@@#++';;;;;;;;;;;;@``````````````````````````##########+........................................
...............................#@#+;;;;;;;;;;;;;;;;;;;;':``````````````````````````##########@........................................
....................................,@#@@@@@#+'';;;;;+@#```````````````````````````##########@........................................
.....................................@``````````.,,,.``````````````````````````````############.......................................
.....................................@`````````````````````````````````````````````#######+'+#@.......................................
.....................................@`````````````````````````````````````````````##########'@.......................................
.....................................#`````````````````````````````````````````````############@#.....................................
.....................................:.````````````````````````````````````````````##############@,...................................
......................................+```````````````````````````````````````````.###############@#..................................
......................................@```````````````````````````````````````````.################@@.................................
......................................@```````````````````````````````````````````.###+##############@................................
......................................@```````````````````````````````````````````.###+###############@...............................
......................................',``````````````````````````````````````````.####'##############@@..............................
.......................................@```````````````````````````````````````````#####+##############@:.............................
.......................................@```````````````````````````````````````````#####'###############@.............................
.......................................@```````````````````````````````````````````######'################............................
.......................................#,``````````````````````````````````````````#######'##############@............................
........................................@``````````````````````````````````````````@######++##############+...........................
........................................@``````````````````````````````````````````@#######'##############@...........................
........................................@``````````````````````````````````````````@########'#############@...........................
.......................................@#'`````````````````````````````````````````@#########'##############..........................
.......................................@#@`````````````````````````````````````````+#########+'############@..........................
......................................@##@`````````````````````````````````````````.##########+'###########@..........................
......................................@##@:`````````````````````````````````````````###########+'###########..........................
.....................................:@###@`````````````````````````````````````````@###########+'+#########,.........................
.....................................@####@`````````````````````````````````````````@#############''########..........................
.....................................@####@.````````````````````````````````````````;##############+'######@..........................
.....................................@#####@`````````````````````````````````````````################@@@###+..........................
.....................................@#####@`````````````````````````````````````````@###############@..;;............................
....................................,@#####@.````````````````````````````````````````+################'...............................
....................................:#######@`````````````````````````````````````````################@...............................
....................................:#######@`````````````````````````````````````````@###############@...............................
....................................,@#######,````````````````````````````````````````:###############@...............................
.....................................@######@@`````````````````````````````````````````@##############@...............................
.....................................@######@@`````````````````````````````````````````+##############@...............................
.....................................@#####@,;;`````````````````````````````````````````@#############@...............................
.....................................@####@@..@`````````````````````````````````````````+#############@...............................
.....................................,####@...@``````````````````````````````````````````@############+...............................
......................................@##@.....@`````````````````````````````````````````:###########@,...............................
.......................................@+......@``````````````````````````````````````````@##########@................................
...............................................:#``````````````````````````````````````````##########@................................
................................................@``````````````````````````````````````````+########@,................................
................................................'+``````````````````````````````````````````@#######@.................................
.................................................@```````````````````````````````````````````@#####@:.................................
.................................................'#``````````````````````````````````````````.#####@..................................
..................................................@```````````````````````````````````````````;###@...................................
...................................................@```````````````````````````````````````````+#@'...................................
...................................................'#```````````````````````````````````````````@#....................................
....................................................##`````````````````````````````````````````@#.....................................
.....................................................#@```````````````````````````````````````@+......................................
......................................................:@;```````````````````````````````````;@,.......................................
.......................................................;@@'```````````````````````````````:@@+;.......................................
.......................................................@,,'@@'``````````````````````````@@@,,,@.......................................
......................................................@,,,,,,'@@@@;````````````````.+@@@;,,,,,@.......................................
......................................................#@+@,,,,,,,,+@@@@@@@@@@@@@@@@@;,,,,,'@@@........................................
.........................................................+,,,#',,@@..............@,,,,,,,,@...........................................
..........................................................@@@,#@@,...............:+,,,'@,,@...........................................
..................................................................................@,,,@.##............................................
...................................................................................@;@................................................
....................................................................................:.................................................
......................................................................................................................................
......................................................................................................................................
 */
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.pow;
import static java.lang.Math.abs;

import static java.lang.String.format;

public class Main {
    final static int INF = Integer.MAX_VALUE>>1;
    final static int MOD = 1000000007;
    final static int[] dx4 = { 0, -1, 1, 0 };
    final static int[] dy4 = { -1, 0, 0, 1 };
    final static int[] dx8 = { -1, -1, -1, 0, 0, 1, 1, 1 };
    final static int[] dy8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
    public static void main(String[] args) {
        Scanner scanner=new Scanner();
        int n=scanner.nextInt();
        int d=scanner.nextInt();
        int x=scanner.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++){
            a[i]=scanner.nextInt();
        }
        int ans=x;
        for(int i=0;i<n;i++){
            ans+=(d-1)/a[i]+1;
        }
        put(ans);

    }

    public static int upper_bound(long[] a,long val){
        return upper_bound(a,0,a.length,val);
    }
    public static int upper_bound(long[] a,int l,int r,long val){
        if(r-l==1){
            if(a[l]>val) return l;
            return r;
        }
        int mid=(l+r)/2;
        if(a[mid]>val){
            return upper_bound(a,l,mid,val);
        }else{
            return upper_bound(a,mid,r,val);
        }
    }
    public static <T> int upper_bound(T[] a,int l,int r,T val,Comparator<T> comparator){
        if(r-l==1){
            if(comparator.compare(a[l],val)>0) return l;
            return r;
        }
        int mid=(l+r)/2;
        if(comparator.compare(a[mid],val)>0){
            return upper_bound(a,l,mid,val,comparator);
        }else{
            return upper_bound(a,mid,r,val,comparator);
        }
    }
    public static int lower_bound(long[] a,long val){
        return lower_bound(a,0,a.length,val);
    }
    public static int lower_bound(long[] a,int l,int r,long val){
        if(r-l==1){
            if(a[l]<val) return r;
            return l;
        }
        int mid=(l+r)/2;
        if(a[mid]<val){
            return lower_bound(a,mid,r,val);
        }else{
            return lower_bound(a,l,mid,val);
        }

    }

    public static <T> int lower_bound(T[] a,int l,int r,T val,Comparator<T> comparator){
        if(r-l==1){
            if(comparator.compare(a[l],val)<0) return r;
            return l;
        }
        int mid=(l+r)/2;
        if(comparator.compare(a[mid],val)<0){
            return lower_bound(a,mid,r,val,comparator);
        }else{
            return lower_bound(a,l,mid,val,comparator);
        }
    }

    public static void print(Object object){
        System.out.print(object);
    }
    public static void put(Object object) {
        System.out.println(object);
    }
    public static void put(){
        System.out.println();
    }

    final static private class Scanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

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

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

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

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

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

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

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

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
    final static private class FixedLongPair {
        final private long x, y;
        final static public FixedLongPair ZEROS=new FixedLongPair(0,0);
        FixedLongPair(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public long getX() {
            return x;
        }

        public long getY() {
            return y;
        }

        @Override
        public int hashCode() {
            return (int)x+(int)y;
        }

        @Override
        public boolean equals(Object obj) {
            boolean result=super.equals(obj);
            if(obj.getClass()!=this.getClass()){
                return false;
            }
            FixedLongPair pair=(FixedLongPair)obj;
            if(this.x==pair.x&&this.y==pair.y) return true;
            return false;
        }

        @Override
        public String toString() {
            return String.format(FixedLongPair.class.getSimpleName()+":(%d,%d)", x, y);
        }
    }
    final static private class FixedIntPair {
        final private int x, y;
        final static public FixedIntPair ZEROS=new FixedIntPair(0,0);
        FixedIntPair(int x, int y) {
            this.x = x;
            this.y = y;
        }

        public int getX() {
            return x;
        }

        public int getY() {
            return y;
        }

        @Override
        public int hashCode() {
            return x+y;
        }

        @Override
        public boolean equals(Object obj) {
            boolean result=super.equals(obj);
            if(obj.getClass()!=this.getClass()){
                return false;
            }
            FixedIntPair pair=(FixedIntPair) obj;
            if(this.x==pair.x&&this.y==pair.y) return true;
            return false;
        }

        @Override
        public String toString() {
            return String.format(FixedIntPair.class.getSimpleName()+":(%d,%d)", x, y);
        }
    }
    final static private class Tuple<T,V>{
        //immutabl1でないことに注意(T,Vがmutableの場合変更可能)
        final private T t;
        final private V v;
        Tuple(T t,V v){
            this.t=t;
            this.v=v;
        }

        public T getT() {
            return t;
        }

        public V getV() {
            return v;
        }

        @Override
        public int hashCode() {
            return (t.hashCode()+v.hashCode());
        }

        @Override
        @SuppressWarnings("unchecked")
        public boolean equals(Object obj) {
            if(obj.getClass()!=this.getClass()){
                return false;
            }
            Tuple<T,V> tuple=(Tuple<T, V>) obj;
            return tuple.t.equals(this.t)&&tuple.v.equals(this.v);
        }

        @Override
        public String toString() {
            return String.format("<Tuple>=<%s,%s>",t,v);
        }
    }
    final static private class Util {
        static long gcd(long a,long b){
            //最大公約数
            if(a%b==0)return b;
            return gcd(b,a%b);
        }
        static long lcm(long a,long b){
            //最小公倍数
            long gcd=gcd(a,b);
            long result=b/gcd;
            return a*result;
        }
        static long kaijoMod(int n,int mod){
            if(n<1) return -1;
            long result=1;
            for(int i=n;i>1;i--){
                result*=i;
                result%=mod;
            }
            return result;
        }
        static <T extends Comparable<T>> Map<T,Integer> count(List<T> list){
            //副作用
            Collections.sort(list);
            Map<T,Integer> result=new HashMap<>();
            int l=0,r=0;
            while(l<list.size()){
                while(r<list.size()-1&&list.get(r).equals(r+1)){
                    r++;
                }
                result.put(list.get(r),r-l+1);
                r++;
                l=r;
            }
            return result;

        }
        static Map<Integer,Integer> count(int[] array){
            //副作用
            Arrays.sort(array);
            Map<Integer,Integer> result=new HashMap<>();
            int l=0,r=0;
            while(l<array.length){
                while(r<array.length-1&&array[r]==array[r+1]){
                    r++;
                }
                result.put(array[l],r-l+1);
                r++;
                l=r;
            }
            return result;
        }
        static <T> String toStringBWS(Iterable<T> iterable){
            Iterator<T> ite=iterable.iterator();
            return toStringBWS(ite);
        }
        static <T> String toStringBWS(Iterator<T> ite){
            StringBuilder sb=new StringBuilder();
            sb.append(ite.next());
            while(ite.hasNext()){
                sb.append(" ");
                sb.append(ite.next());
            }
            return sb.toString();
        }
        static int[] factoringInPrimeNumbers(long n,int size){
            //素因数分解
            //sizeがnに比べて小さい場合完全に素因数分解出来ていない可能性がある
            int[] result=new int[size];
            for(int i=2;n>1&&i< result.length;i++){
                while(n%i==0){
                    result[i]++;
                    n/=i;
                }
            }
            return result;

        }
        public static long min(long... longs){
            if(longs.length==0)throw new IllegalArgumentException("Argument.length==0");
            long min=Long.MAX_VALUE;
            for(int i=0;i<longs.length;i++){
                min=Math.min(min,longs[i]);
            }
            return min;
        }
        public static long max(long... longs){
            if(longs.length==0)throw new IllegalArgumentException("Argument.length==0");
            long max=Long.MIN_VALUE;
            for(int i=0;i<longs.length;i++){
                max=Math.max(max,longs[i]);
            }
            return max;
        }
    }
}


import java.util.*;
public class Mains{

	public static void main(String[] args) {
		Scanner sc= new Scanner (System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();
		int X = sc.nextInt();
		int []A = new int[N];
		int total = X;
		for(int i = 0; i < N; i++) {
			A[i] = sc.nextInt();
			for(int a = 0; a < D; a+=A[i]) {
				total++;
			}
		}
		System.out.println(total);

	}
}


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

public class Solution {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int D = sc.nextInt();
    int X = sc.nextInt();
    for(int i =1; i<=N; i++){
      int ai = sc.nextInt();
      for(int d = 1; d<=D; d+=ai){
         X++;
      }
    }
    System.out.println(X);
  }
}


import java.util.*;
public class Main{

	public static void main(String[] args) {
		Scanner sc= new Scanner (System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();
		int X = sc.nextInt();
		int []A = new int[N];
		int total = X;
		for(int i = 0; i < N; i++) {
			A[i] = sc.nextInt();
			for(int a = 0; a < D; a++) {
				if(a*A[i]+1 >= D) {
					total += a;
					break;
				}
			}
		}
		System.out.println(total+1);

	}
}


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

int main()
{
    int N, D, X, A, choco = 0;
    cin >> N >> D >> X;
    for (int i=0; i<N; i++){
        cin >> A;
        for(int i=0; i*A+1<=D; i++) choco++;
    }
    cout << choco + X << endl;
    return 0;
}


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


#include <iostream>
using namespace std;

int main(){

	int n, d, x, a[100], max=0;
	cin >> n >> d >> x;
	for (int i = 0; i < n; i++) cin >> a[i];

	for (int i = 0; i < n; i++){

		for (int j = 0;j < 101; j++){
			int p = 1;
			p += a[i] * j;
			if (p > d) continue;
			max++;
		}
	}

	cout << x + max << endl;

	return 0;
}


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

int main() {
  long N, D, X, a, ans = 0;
  cin >> N >> D >> X;

  for (int i = 0; i < N; i++) {
    cin >> a;
    for (int j = i; j <= D; j++) {
      if (j == i) {
        ans++;
      }
      if (j%a == 0 && j < D && j != i) {
        ans++;
      }
    }
  }

  cout << ans+X << endl;
}


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

int main() {
  long N, D, X, a, ans = 0;
  cin >> N >> D >> X;

  for (int i = 0; i < N; i++) {
    cin >> a;
    for (int j = i; j <= D; j++) {
      if (j == i) {
        ans++;
      }
      if (j%a == 0 && j <= D && j != i) {
        ans++;
      }
    }
  }

  cout << ans+X << endl;
}


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

int main() {
  long N, D, X, a, ans = 0;
  cin >> N >> D >> X;

  for (int i = 0; i < N; i++) {
    cin >> a;
    for (int j = i; j < D; j++) {
      if (j == i) ans++;
      if (j%a == 0 && j < D && j != i) ans++;
    }
  }

  cout << ans+X << endl;
}


#include <stdio.h>

int main(void)
{
        int n,d,x,i,j,c;

        scanf("%d%d%d",&n,&d,&x);

        int a[n];

        for(i=0;i<n;i++)
                scanf("%d",&a[i]);

        c=0;
        for(i=0;i<n;i++){
                for(j=0;a[i]*j+1<=d;j++){
                        c++;
                }
        }
        printf("%d\n",c+x);
        return 0;
}


#include <stdio.h>
#include <string.h>

int main(void){
	int n,d,x;
	int a[101];
	int i;
	int ans;

	scanf("%d",&n);
	scanf("%d %d",&d,&x);

	ans = x;

	for(i = 1;i <= n; i++ ){
		scanf("%d",&a[i]);
		ans += (1 + ((d - 1) / a[i]) );
	}

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

	return 0;
}


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


#include<stdio.h>
int main(){
  int n,x,a,i,d;
  scanf("%d%d%d",&n,&d,&x);
  for(i=0;i<n;i++){scanf("%d",&a);x+=(d-1)/t+1;}
  printf("%d",x);
}


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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   int n,d,x;scanf("%d%d%d",&n,&d,&x);
   int a[101];
   int ans=0;
   for(int i = 0;i < n;i++)scanf("%d",&a[i]);
   for(int i = 0;i < n;i++){
      ans += (((a[i]==1)?0:1) + d/a[i]);
   }
   printf("%d",ans+x);
}


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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   int n,d,x;scanf("%d%d%d",&n,&d,&x);
   int a[101];
   int ans=0;
   for(int i = 0;i < n;i++)scanf("%d",&a[i]);
   for(int i = 0;i < n;i++){
      ans += 1 + d/a[i];
   }
   printf("%d",ans+x);
}


function main(input) {
    var N = input[0]-0;
    var D = input[1].split(" ")[0]-0;
    var X = input[1].split(" ")[1]-0;
    var ans = X;
    for(var i=2;i<2+N;i++){
        ans += Math.ceil(D/input[i]);
    }
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))


function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}
function myout(t){console.log(t);}//standard output
function myerr(t){console.error(t);}//standard error
//[no]param
//0:何もしない  1:数値へ変換  2:半角SPで分割  3:改行で分割  4:半角SPで分割し、数値配列へ
//5:改行で分割し、数値配列へ  6:1文字に分割  7:1文字に分割し、数値配列へ
function myconv(i,no){switch(no){case 0:return i;case 1:return parseInt(i);case 2:return i.split(" ");case 3:return i.split("\n");case 4:return i.split(" ").map((a)=>Number(a));case 5:return i.split("\n").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));}}
function Main(input) {
  input = myconv(input,3);
  var N = myconv(input[0],1);
  var D = myconv(input[1],4)[0];
  var X = myconv(input[1],4)[1];
  var output = 0;
  input.shift();
  input.shift();
  input = input.map((a)=>Number(a));
  for(var i = 0; i < N; i++){
    var tmp = 1;
    while(tmp <= D){
      output++;
      tmp += input[i];
    }
  }
  myout(output + X);
}
Main(myin());


function Main(input) {
	input = input.trim();
  	input = input.split("\n");

  	var member = input[0];

	var imput_tmp = input[1].split(" ");
	var days = parseInt(imput_tmp[0], 10);
 	var nokori = parseInt(imput_tmp[1], 10);

  	var chocolate_cnt = 0;
  	var eatday;
	for (var i = 2; i < input.length + 1; i++) {

		for (var j = 0; j < days + 1; j++) {
        	eatday = input[i] * j + 1;
			if (eatday <= days) {
              chocolate_cnt += 1;
            } else {
            	break;
            }
		}

    }

	console.log(chocolate_cnt + nokori);

}

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


function Main(input) {
	input = input.trim();
	input = input.split("\n");

	var member = input[0];

	var imput_tmp = input[1].split(" ");
	var days = parseInt(imput_tmp[0], 10);
	var nokori = parseInt(imput_tmp[1], 10);

	var chocolate_cnt = 0;
	var eatday;
	for (var i = 2; i < input.length + 1; i++) {
		for (var j = 0; j < days + 1; j++) {
			eatday = input[i] * j + 1;
			if (eatday <= days) {
				chocolate_cnt += 1;
			} else {
				break;
			}
		}
	}

	console.log(chocolate_cnt + nokori);

}


function Main(input) {
  var lines = input.split('\n');
  var line_1 = lines[1].split(' ');
  var N = Number(lines[0]);
  var D = Number(line_1[0]);
  var X = Number(line_1[1]);
  var A = [];
  for (var i = 0; i < N; i ++) {
    A[i]=Number(lines[i + 2]);
  }
  var count = X;
  for (var i = 0; i < N; i ++) {
    count += (Math.floor(7 / A[i]) + 1);
  }
  console.log(count);
}

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


function Main(input) {
  var lines = input.split('\n');
  var line_1 = lines[1].split(' ');
  var N = Number(lines[0]);
  var D = Number(line_1[0]);
  var X = Number(line_1[1]);
  var A = [];
  for (var i = 0; i < N; i ++) {
    A[i]=Number(lines[i + 2]);
  }
  var count = X;
  for (var i = 0; i < N; i ++) {
    count += (7 % A[i] + 1);
  }
  console.log(count);
}

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


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
	"reflect"
	"strconv"
	"unsafe"
)

var DEBUG = true

func main() {
	defer Flush()
	N := readi()
	D := readi()
	X := readi()
	_, A := readInts(N)

	var ans int
	for _, v := range A {
		for d := 0; d < D; d += v {
			ans++
		}
	}
	println(ans + X)

}

func f(n int) int {
	if n%2 == 0 {
		return n / 2
	}
	return 3*n + 1
}

// =============================================================================

// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// these functions are derived from sort in Go source.
// name of functions are changed

// The function panics if the provided interface is not a slice.
func Reverse(slice interface{}) {
	rv := reflect.ValueOf(slice)
	swap := _reverse_Swapper(slice)
	length := rv.Len()
	for i, j := 0, length-1; i < j; i, j = i+1, j-1 {
		swap(i, j)
	}
}

func _reverse_Swapper(slice interface{}) func(i, j int) {
	v := reflect.ValueOf(slice)
	vdata := v.Pointer()
	vlen := v.Len()
	vcap := v.Cap()

	sz := int(v.Type().Elem().Size())

	// for typical small elements
	switch sz {
	case 24: // for slice
		var s [][3]int64
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	case 16: // for string
		var s [][2]int64
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	case 8:
		var s []int64
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	case 4:
		var s []int32
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	case 2:
		var s []int16
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	case 1:
		var s []int8
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen
		h.Cap = vcap
		return func(i, j int) { s[i], s[j] = s[j], s[i] }
	}

	// for large elements
	if sz%16 == 0 {
		m := sz / 16
		var s [][2]int64
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen * m
		h.Cap = vcap * m
		return func(i, j int) {
			for k := 0; k < m; k++ {
				ri := i*m + k
				rj := j*m + k
				s[ri], s[rj] = s[rj], s[ri]
			}
		}
	}
	if sz%8 == 0 {
		m := sz / 8
		var s []int64
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen * m
		h.Cap = vcap * m
		return func(i, j int) {
			for k := 0; k < m; k++ {
				ri := i*m + k
				rj := j*m + k
				s[ri], s[rj] = s[rj], s[ri]
			}
		}
	}
	if sz%4 == 0 {
		m := sz / 4
		var s []int32
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen * m
		h.Cap = vcap * m
		return func(i, j int) {
			for k := 0; k < m; k++ {
				ri := i*m + k
				rj := j*m + k
				s[ri], s[rj] = s[rj], s[ri]
			}
		}
	}
	if sz%2 == 0 {
		m := sz / 2
		var s []int16
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen * m
		h.Cap = vcap * m
		return func(i, j int) {
			for k := 0; k < m; k++ {
				ri := i*m + k
				rj := j*m + k
				s[ri], s[rj] = s[rj], s[ri]
			}
		}
	} else {
		m := sz
		var s []int8
		h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
		h.Data = vdata
		h.Len = vlen * m
		h.Cap = vcap * m
		return func(i, j int) {
			for k := 0; k < m; k++ {
				ri := i*m + k
				rj := j*m + k
				s[ri], s[rj] = s[rj], s[ri]
			}
		}
	}
}

// =============================================================================
// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

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

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte.  Trailing '\n' will not be included.
// See also comments on readb()
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func dbgf(f string, args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintf(os.Stderr, f, args...)
}

func dbg(args ...interface{}) {
	if !DEBUG {
		return
	}
	fmt.Fprintln(os.Stderr, args...)
}

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

// Utilities

func sumSlice(a []int) int {
	var res int
	for _, v := range a {
		res += v
	}
	return res
}

func sumSlicell(a []int64) int64 {
	var res int64
	for _, v := range a {
		res += v
	}
	return res
}

func readInts(N int) (int, []int) {
	if N == 0 {
		N = readi()
	}
	a := make([]int, N)
	for i := range a {
		a[i] = readi()
	}
	return N, a
}

func readIntsll(N int) (int, []int64) {
	if N == 0 {
		N = readi()
	}
	a := make([]int64, N)
	for i := range a {
		a[i] = readll()
	}
	return N, a
}

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

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

func minll(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func minf(a, b float64) float64 {
	if a < b {
		return a
	}
	return b
}

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

func maxll(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func maxf(a, b float64) float64 {
	if a < b {
		return b
	}
	return a
}

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

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

func absf(a float64) float64 {
	if a < 0 {
		return -a
	}
	return a
}

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}


package main

import (
	. "fmt"
)

// func init() { Println("----------------------------------------") }

func main() {
    var n, d, x int
    Scanf("%d", &n)
    Scanf("%d %d", &d, &x)
    A := make([]int, 0, 100)
    for i := 0; i < n; i++ {
        a := 0
        Scanf("%d", &a)
        A = append(A, a)
    }

    ans := 0
    for i := 0; i < n; i++ {
        a := 1

        for a <= d {
            a += A[i]
            ans++
        }
    }

    Println(ans + x)
}


package main

import (
	"fmt"
)

func chocoday(x int, d int)int{
	chocoday := 0
	for a:=0; a*x+1<=d; a++{
		chocoday++
	}
	return chocoday
}

func main() {
	var n, d, x int
	fmt.Scan(&n)
	fmt.Scan(&d, &x)
	chococap := make([]int, n)
	for i:=0; i<n; i++{
		fmt.Scan(&chococap[i])
	}
	choconum := 0
	for l:=0; l<n; l++{
		choconum += chocoday(chococap[l], d)
	}
	fmt.Println(choconum + x)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func nextInt() int {
	sc.Scan()

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

	i, e := strconv.ParseInt(sc.Text(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}

func nextF64() float64 {
	sc.Scan()

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

func main() {

	n := nextInt()
	d := nextInt()
	x := nextInt()

	var a []int
	var cnt int
	for i := 0; i < n; i++ {
		a = append(a, nextInt())
	}

	for _, val := range a {
		for i := 1; i <= d; i += val {
			cnt++
		}
	}
	fmt.Println(cnt + x)
}


package main

import "fmt"

func main() {
	var people, days, modNum int

	fmt.Scanf("%d", &people)
	fmt.Scanf("%d %d", &days, &modNum)

	var data int
	var eatedChoco int
	var eatedChocoTotal int = 0
	for i := 0; i < people; i++ {
		eatedChoco = 0
		fmt.Scanf("%d", &data)

		var counter int = 0
		for {
			if counter*data+1 <= days {
				eatedChoco++
			} else {
				break
			}
			counter++
		}
		fmt.Println(eatedChoco)

		eatedChocoTotal += eatedChoco
	}

	fmt.Print(eatedChocoTotal + modNum)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, math.MaxInt64)
}

func readInt() int {
	sc.Scan()
	r, _ := strconv.Atoi(sc.Text())
	return r
}

func main() {
	n := readInt()
	d, x := readInt(), readInt()
	var a []int
	var sum int
	for i := 0; i < n; i++ {
		a = append(a, readInt())
	}
	fmt.Println(a)

	for i := 0; i < n; i++ {
		sum += 1 + (d-1)/a[i]
	}
	fmt.Println(sum + x)
}


n = gets.to_i
d, x = gets.split.map &:to_i
r = 0
n.times do
  a = gets.to_f
  r += (d/a).ceil
end
puts r+x


N,D,X,*as=$<.read.split.map(&:to_i)

ret = X

as.each do |a|
    ret += (D-1)/a + 1
end

puts ret


N = gets.to_i
D,X = gets.split.map(&:to_i)
num = 0
N.times do |i|
    a = gets.to_i
    j = 0
    loop do
        day = j * a + 1

        if day <= D then
            j += 1
            num += 1
        else break
        end
    end
end
puts num + X


n = gets.to_i
d,x = gets.strip.split.map(&:to_i)
array = []
while number = gets
  array << number.chomp.to_i
end
sum = 0
for i in 0..n-1
  sum += ((d-1).to_f/array[i]).ceil
end
puts sum+x


n = gets.to_i
d, x = gets.split.map(&:to_i)
a = n.times.map { (gets.to_i / d) + 1 }

puts a.inject(:+) + x


n = gets.to_i
d, x = gets.split.map(&:to_i)
a = n.times.map { (d / gets.to_i) + 1}

puts a.inject(:+) + x


use std::io::stdin;

fn main() {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let member: u32 = buf.trim().parse().unwrap();

    buf.clear();
    stdin().read_line(&mut buf).unwrap();
    let mut line = buf.split_whitespace();
    let days: u32 = line.next().unwrap().parse().unwrap();
    let last: u32 = line.next().unwrap().parse().unwrap();

    let mut intervals = Vec::new();
    for _ in 0..member{
        let mut buf = String::new();
        stdin().read_line(&mut buf).unwrap();
        let interval:u32 = buf.trim().parse().unwrap();
        intervals.push(interval);
    }

    println!("{}", solve(days, last, intervals));
}

fn solve(days: u32, last: u32, mut intervals: Vec<u32>) -> u32{
    let mut result = 0;
    intervals.sort();

    let mut current_interval = 0;
    let mut temp_counter = 0;
    for interval in intervals{
        if interval == current_interval{
            result += temp_counter;
        } else {
            current_interval = interval;
            temp_counter = (days - 1) / interval + 1;
            result += temp_counter;
        }
    }
    result + last
}


use std::io;

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

fn main() {
	let v:Vec<i32> = procon_read();
	let n = v[0];
	let v:Vec<i32> = procon_read();
	let d = v[0];
	let x = v[1];
	let mut cnt = x+n;
	for i in 0..n {
		let v:Vec<i32> = procon_read();
		let a = v[0];
		for i in 1.. {
			if i*a+1 > d {
				break;
			}
			cnt += 1;
		}
	}
	println!("{}", cnt);
}


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

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

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

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

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

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

  ($iter:expr, [ next / $t:tt ]) => {
    {
        let len = read_value!($iter, usize);
        (0..len).map(|_| read_value!($iter, $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")
  };
}

pub trait LexicalPermutation {
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the last ordered permutation.
    fn next_permutation(&mut self) -> bool;
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the first ordered permutation.
    fn prev_permutation(&mut self) -> bool;
}

impl<T> LexicalPermutation for [T]
where
    T: Ord,
{
    /// Original author in Rust: Thomas Backman <serenity@exscape.org>
    fn next_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly decreasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] >= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the last-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Find the rightmost element larger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j] <= self[i - 1] {
            j -= 1;
        }

        // Step 3: Swap that element with the pivot
        self.swap(j, i - 1);

        // Step 4: Reverse the (previously) weakly decreasing part
        self[i..].reverse();

        true
    }

    fn prev_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly increasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] <= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the first-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Reverse the weakly increasing part
        self[i..].reverse();

        // Step 3: Find the rightmost element equal to or bigger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j - 1] < self[i - 1] {
            j -= 1;
        }

        // Step 4: Swap that element with the pivot
        self.swap(i - 1, j);

        true
    }
}

#[cfg(not(debug_assertions))]
macro_rules! mydbg {
    ($($arg:expr),*) => {};
}

macro_rules! echo {
    ($($a:expr),*) => {
          $(println!("{}",$a))*
      }
}

use std::cmp::Ordering::*;
#[allow(unused_imports)]
use std::cmp::{max, min};
use std::collections::{HashMap, HashSet, VecDeque};
use std::io::{stdout, BufWriter, Write};
use std::mem::swap;

fn main() {
    input! {
        n: usize,
        d: usize,
        x: usize,
        a: [usize; n],
    }
    let mut ans = x;
    for i in 0..n {
        ans += (d + a[i] - 1) / a[i];
    }
    echo!(ans);
}