#include<stdio.h>

int main()
{
	char a[1001];
	int i, w;
	scanf("%s", a);
	scanf("%d", &w);
	for (i = 0; a[i] != '\0'; i++){
		if (i%w == 0){
			printf("%c", a[i]);
		}
	}
	return 0;
}
### Prompt

Construct a CPP code solution to the problem outlined:

You are given a string S consisting of lowercase English letters. We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom.

Constraints

* 1 \leq w \leq |S| \leq 1000
* S consists of lowercase English letters.
* w is an integer.

Input

Input is given from Standard Input in the following format:


S
w


Output

Print the desired string in one line.

Examples

Input

abcdefgh
3


Output

adg


Input

lllll
1


Output

lllll


Input

souuundhound
2


Output

suudon

### Response

```cpp
#include<stdio.h>

int main()
{
	char a[1001];
	int i, w;
	scanf("%s", a);
	scanf("%d", &w);
	for (i = 0; a[i] != '\0'; i++){
		if (i%w == 0){
			printf("%c", a[i]);
		}
	}
	return 0;
}
```